Core Concepts
Permission Format
Every permission in Agatabo follows the patternresource:action. The resource identifies what is being acted upon; the action describes what the user can do with it.
| Example | What It Grants |
|---|---|
savings:write | Record deposits and withdrawals |
loans:read | View loan details and installment schedules |
expenses:write | Record and categorize expenses |
audit_logs:read | View the organization’s audit trail |
settings:write | Modify organization settings |
SELF vs. ANY Scopes
Every permission grant carries a scope that controls the breadth of data the user can access:| Scope | Access Level | Example |
|---|---|---|
| SELF | Only the user’s own records | A member reading their own savings balance |
| ANY | All records across the entire organization | A treasurer reading every member’s savings balance |
savings:readwith SELF → you can view your own savings history onlysavings:readwith ANY → you can view every member’s savings historyloans:writewith SELF → you can apply for a loan on your own behalf onlyloans:writewith ANY → you can create a loan for any member
savings:read SELF from a Member role and savings:read ANY from a Treasurer role effectively has savings:read ANY.
The
audit_logs:read permission requires the ANY scope specifically. Even if a user holds this permission, Agatabo will reject the request unless the scope is ANY.How Agatabo Checks Permissions
Every time you perform an action in Agatabo, the system runs through these steps:- Authenticates your token — a valid Bearer token and
x-organization-idheader are required. - Resolves your organization membership — confirms you are a member of the organization in the header.
- Builds your effective grant set — collects all permission grants from every role you hold and merges them (ANY scope wins over SELF for duplicate keys).
- Checks for the required permission — if it’s absent, you receive a
403 Insufficient permissionserror. - Validates scope — if the endpoint requires ANY scope and you only hold SELF, you receive
403 Insufficient permission scope. - Validates SELF restriction — if you hold only SELF scope and are attempting to access another member’s data, you receive
403 Permission scope denied.
View Your Own Permissions
To see exactly which permissions you currently hold and at what scope, call:Complete Permission List
| Category | Permission Key | Description |
|---|---|---|
| Organization Users | organization_users:read | View the member list and individual member details |
organization_users:write | Add, edit, and remove organization members | |
organization_user_roles:read | View role definitions and their grants | |
organization_user_roles:write | Create, edit, and delete role definitions | |
organization_user_roles:assign | Assign and unassign roles to users | |
| Savings | savings:read | View deposit and withdrawal history |
savings:write | Record deposits and withdrawals | |
| Loans | loans:read | View loan details and installment schedules |
loans:write | Create new loans and record payments | |
loans:modify | Modify existing loan terms | |
loans:approve | Approve loan applications | |
| Bank Accounts | bank_accounts:read | View bank account list and current balances |
bank_accounts:write | Create, update, and delete bank accounts | |
| Expenses | expenses:read | View the expense history |
expenses:write | Record and categorize expenses | |
| Assets | assets:read | View the fixed asset register |
assets:write | Add, modify, and dispose of assets | |
| Reserves | reserves:read | View reserve balances |
reserves:write | Allocate funds to reserves and release them | |
| Dividends | dividends:read | View dividend pools and distribution history |
dividends:write | Create dividend pools and distribute dividends | |
| General Ledger | ledger:read | View ledger accounts, journal entries, and the trial balance |
ledger:write | Post manual journal entries | |
| Reports | reports:read | Access financial reports (balance sheet, profit & loss, etc.) |
| Settings | settings:read | View organization settings |
settings:write | Modify organization settings | |
| Period Closing | periods:close | Close accounting periods and undo period closes |
| Audit Logs | audit_logs:read | View the audit trail (requires ANY scope) |
Example Role Configurations
These examples reflect typical setups. Your organization defines its own role names and permission sets — the configurations below are starting points, not fixed templates.Administrator
Administrators oversee the entire organization and need unrestricted access to every function.- Permissions
- Restrictions
All of the following with ANY scope:
organization_users:write— manage all membersorganization_user_roles:assign— assign and revoke rolessavings:write— record deposits and withdrawalsloans:write,loans:modify,loans:approve— full loan managementexpenses:write— record and categorize expensesassets:write— manage the fixed asset registerreserves:write— allocate and release reservesdividends:write— distribute dividendsbank_accounts:write— manage bank accountsledger:write— post manual journal entriessettings:write— change organization settingsperiods:close— close accounting periodsaudit_logs:read— view the full audit trailreports:read— access all financial reports
Treasurer
The Treasurer handles daily cash flow — deposits, withdrawals, expenses, and financial reporting — without touching loans, settings, or role management.- Permissions
- Restrictions
All of the following with ANY scope:
organization_users:read— view the member listsavings:write— record deposits and withdrawalsexpenses:write— record and categorize expensesbank_accounts:read— view bank account balancesledger:read— view ledger accounts and journal entriesreports:read— view financial reports
Loan Officer
The Loan Officer manages the full loan lifecycle — creating, modifying, and approving loans — but has no write access to savings, settings, or role management.- Permissions
- Restrictions
All of the following with ANY scope:
organization_users:read— view members to verify eligibilityloans:write— create loans and record paymentsloans:modify— adjust loan terms when neededloans:approve— approve pending loan applicationssavings:read— view member savings to assess eligibilityreports:read— view reports
Member
The standard Member role lets individuals view their own financial information without exposing any other member’s data.- Permissions
- Restrictions
All of the following with SELF scope:
organization_users:read— view own profile informationsavings:read— view own savings balance and historyloans:read— view own loan details and payment scheduleledger:read— view own ledger account statement
When you assign the member role to a user, Agatabo automatically creates a savings ledger account for that person. No additional setup is required.
Principle of Least Privilege
The most important security guideline for managing Agatabo permissions is least privilege: grant each user only the permissions they genuinely need to fulfill their responsibilities, and nothing beyond that. In practice, this means:- Start minimal, add as needed. Begin with a read-only role and expand access when a specific need arises.
- Default to SELF scope for member-facing roles. Members rarely need to see each other’s financial data.
- Reserve ANY scope for operational staff — treasurers, loan officers, and administrators whose work requires visibility across all accounts.
- Limit who can assign roles. The
organization_user_roles:assignpermission is especially sensitive — a user with this permission can grant themselves or others any level of access. Restrict it tightly. - Separate duties. Don’t combine the Treasurer and Loan Officer functions in a single role unless your organization is too small to avoid it. Separation reduces both error and fraud risk.
- Review role assignments regularly. Revoke roles promptly when a person’s responsibilities change or they leave the organization.
- Use
isProtected: truefor critical roles to prevent accidental deletion.
Troubleshooting
I received a 'Insufficient permissions' error
I received a 'Insufficient permissions' error
This error means your account does not hold the required permission at all. Call
GET /me/permissions to see your current grants, identify the missing permission, and ask your administrator to assign a role that includes it. After the role is assigned, log out and back in to refresh your access token.I'm confused about when to use SELF vs. ANY scope
I'm confused about when to use SELF vs. ANY scope
A simple rule: use SELF for any permission a regular member needs to manage their own account (view my savings, view my loans). Use ANY for staff whose job requires visibility across all member accounts (record a deposit for any member, view all loans for reporting). When in doubt, start with SELF and upgrade to ANY only when a specific workflow requires it. Remember: if a user holds both scopes for the same permission through different roles, ANY always wins.
How do I check what I'm allowed to do?
How do I check what I'm allowed to do?
Call
GET /me/permissions with your Bearer token and x-organization-id header. The response lists every permission key and its effective scope. This is the ground truth — it reflects the merged result of all your assigned roles with scope precedence already applied.An administrator was accidentally removed from the admin role
An administrator was accidentally removed from the admin role
The admin role cannot be assigned or unassigned through the standard role-assignment endpoints. Use the dedicated
set-admin endpoint to restore administrator access. If no one in the organization retains admin access, contact your system administrator for emergency restoration.Settings Overview
Return to the top-level settings guide to see how permissions fit alongside other configuration areas.
Audit Trail
Review the audit log to track every role assignment, permission change, and administrative action.