Staff Permissions
Configure treasury team roles, permissions, and notification thresholds.
Overview
Treasury uses a role-based permission system to control what staff members can do. Staff are assigned to teams and roles, with permissions defined at the role level.
Admin URL: /admin/treasury/settings/teams-roles
Staff Management
Adding Treasury Staff
Location: Treasury > Settings > StaffURL: /admin/treasury/settings/staff
To add a staff member to Treasury:
- Go to Settings > Staff
- Click "Add Staff"
- Search for the admin user
- Select a team and role
- Click "Add"
Removing Staff
From the staff list, click the ... menu on the staff member and select "Remove".
Teams
Teams are organizational groups for categorizing staff. They don't affect permissions but help organize your treasury team.
Default Teams:
- General - Default team for all treasury officers
- Deposits Team - Specialized team for handling deposit requests
- Withdrawals Team - Specialized team for handling withdrawal requests
- Transfers Team - Specialized team for handling transfer requests
Creating a Team
- Go to Settings > Teams & Roles
- Click "Create Team"
- Enter team name, color, and icon
- Click "Save"
Roles
Roles define what permissions a staff member has. Each staff member is assigned one role.
Default Roles
| Role | Description | Key Permissions |
|---|---|---|
| Treasury Officer | Basic access | View, Approve Deposits/Withdrawals |
| Senior Officer | Extended access | + Decline, Process Transfers, Whitelisting |
| Treasury Supervisor | Management access | + Balance Operations, Vouchers, Manage Staff, Reports |
| Treasury Admin | Full access | + Manage Methods, Manage Settings |
| Super Admin | Unrestricted | All permissions |
Creating a Role
- Go to Settings > Teams & Roles
- Click "Create Role"
- Enter role name, color, and icon
- Select permissions from each category
- Click "Save"
Permission Categories
Access Level
| Permission | Description |
|---|---|
super_admin | Full unrestricted access to all Treasury features |
View Access
| Permission | Description |
|---|---|
view | Can access the Treasury dashboard |
view_transactions | Can view all deposit and withdrawal transactions |
view_wallets | Can view wallet balances and details |
Deposits
| Permission | Description |
|---|---|
approve_deposits | Can approve pending deposit requests |
decline_deposits | Can decline/reject deposit requests |
Withdrawals
| Permission | Description |
|---|---|
approve_withdrawals | Can approve pending withdrawal requests |
decline_withdrawals | Can decline/reject withdrawal requests |
Whitelisted Accounts
| Permission | Description |
|---|---|
approve_whitelisted | Can approve whitelisted account requests |
reject_whitelisted | Can reject whitelisted account requests |
manage_whitelisted | Can suspend, delete, or modify whitelisted accounts |
Operations
| Permission | Description |
|---|---|
process_transfers | Can process transfer requests between accounts |
balance_operations | Can perform quick balance adjustments (deposit, withdraw, deduct) |
create_vouchers | Can create new vouchers |
manage_vouchers | Can view, cancel, and manage existing vouchers |
Administration
| Permission | Description |
|---|---|
manage_methods | Can create and edit deposit/withdrawal methods |
manage_staff | Can configure staff access and permissions |
manage_settings | Can change Treasury settings and configuration |
Reports & Help
| Permission | Description |
|---|---|
view_reports | Can access reports and analytics |
export_reports | Can export reports to CSV/Excel |
view_guides | Can access help guides and documentation |
Notifications
| Permission | Description |
|---|---|
receive_email_notifications | Receive email alerts for deposits, withdrawals, and other events above configured thresholds |
Email Notifications for Staff
Staff with the receive_email_notifications permission will receive email alerts when transactions exceed configured thresholds.
How It Works
Configure Thresholds:
- Deposits: Settings > Deposits > "Notify Staff via Email Above"
- Withdrawals: Settings > Withdrawals > "Notify Admin on Large Amount"
Enable Permission:
- Edit the role in Settings > Teams & Roles
- Enable "Receive Email Notifications" under Notifications
Trigger:
- When a deposit/withdrawal is approved and exceeds the threshold
- Email is sent to all eligible staff members
Email Content
The notification email includes:
- Transaction type and action (e.g., "Deposit Approved")
- Amount
- User name and email
- Transaction ID
- Payment method
- Date and time
- Link to view details
Email Template
The notification uses the "Admin Notification - Generic" email template, which can be customized at:Admin > Settings > Email Templates > admin-notification
Checking Permissions Programmatically
// Get staff config for an admin
$staffConfig = TreasuryStaffConfig::where('admin_id', $adminId)->first();
// Check specific permission
if ($staffConfig->hasPermission('approve_deposits')) {
// Can approve deposits
}
// Check if can receive notifications
if ($staffConfig->canReceiveEmailNotifications()) {
// Send notification
}
// Check if super admin
if ($staffConfig->isSuperAdmin()) {
// Has all permissions
}
Related Files
Models
app/Models/Treasury/TreasuryStaffConfig.php- Staff configurationapp/Models/Treasury/TreasuryOption.php- Teams and roles
Controllers
app/Http/Controllers/Admin/Treasury/StaffController.php- Staff managementapp/Http/Controllers/Admin/Treasury/TeamsRolesController.php- Teams & roles management
Views
resources/views/admin/treasury/settings/staff.blade.php- Staff listresources/views/admin/treasury/settings/teams-roles.blade.php- Teams & roles listresources/views/admin/treasury/settings/roles/create.blade.php- Create role formresources/views/admin/treasury/settings/roles/edit.blade.php- Edit role form
Middleware
app/Http/Middleware/CheckTreasuryPermission.php- Permission checking middleware
Best Practices
- Principle of least privilege: Give staff only the permissions they need
- Use teams for organization: Group staff by function (deposits, withdrawals, etc.)
- Create custom roles: Don't modify default roles; create new ones for specific needs
- Enable notifications for supervisors: Senior staff should have email notifications enabled
- Set reasonable thresholds: Don't set notification thresholds too low to avoid email overload
- Regular audits: Periodically review staff permissions and remove unnecessary access
- Document role purposes: Add descriptions to custom roles for clarity