Designations & Permissions (RBAC) — Access Control Deep Dive
7 min read
Staff & Access Control
25. Designations & Permissions (RBAC) — Access Control Deep Dive
Reading Time: 7 min
Goal: Create designations, assign permissions, manage access control
Video Tutorial
Watch this step-by-step video tutorial:
What is RBAC?
RBAC = Role-Based Access Control. You can give each staff member specific permissions to control what they can see and do.
Example:
| Staff | Designation | Can Do | Cannot Do |
|---|---|---|---|
| Rahul | Order Manager | View orders, Update status | Delete products, Access settings |
| Priya | Product Manager | Add/edit products, Manage categories | View reports, Access payments |
| Amit | Admin | Everything | — |
Step 1: Navigate to Designations
- Left sidebar → Staff Management
- Click the Designations tab
Step 2: Create a New Designation
Click "Add Designation" :
| Field | Explanation | Example |
|---|---|---|
| Name | Designation name | "Order Manager" |
| Description | What this role does (optional) | "Manages orders and returns" |
Step 3: Assign Permissions
After creating a designation, you need to assign permissions:
- On the designation list, click "Edit Permissions"
- Permissions are grouped into categories:
Permission Groups:
| Group | Permissions | Who Should Get This |
|---|---|---|
| Products | view, add, update, delete | Product Manager |
| Orders | view, update, cancel, print_invoice | Order Manager |
| Customers | view, update | Support Staff |
| Customer Wallet | view, credit, debit | Finance Staff |
| Payments | view, update | Finance Staff |
| Staff | view, add, update, deactivate | Admin only |
| Designations | view, add, update, delete | Admin only |
| Reports | view, sales, inventory, products | Management |
| Settings | theme, business_profile, mail, etc. | Admin only |
| And many more... | 60+ permissions total | — |
Permission Naming Convention:module.action— e.g.,product.view,order.update,customer.delete
- Check the permissions you want to give this designation
- Click Save
Step 4: Assign Designation to Staff
When creating or editing a staff member, select their Designation from the dropdown. The staff member will inherit all permissions assigned to that designation.
Step 5: Affiliate Store vs Standard Store Permissions
| Permission Group | Standard Store | Affiliate Store |
|---|---|---|
| Products | ✅ Full | ✅ Limited |
| Orders | ✅ Full | ❌ |
| Payments | ✅ Full | ❌ |
| Courier | ✅ Full | ❌ |
| Inventory | ✅ Full | ❌ |
| Customers | ✅ Full | ❌ |
| Marketing | ✅ Full | ✅ Limited |
| Settings | ✅ Most | ✅ Limited |
Note: Affiliate stores don't have certain permissions likeorder.,payment., orcourier.*.
How the Permission Check System Works
- Staff logs in
- The system loads their designation's permissions from cache (Redis)
- On every page load, middleware checks: "Does this staff member have permission X?"
- If they don't have permission, they see a 403 error or the option is hidden
Pro Tip: Permissions are cached for 24 hours. If you change permissions, it may take a while for the effect to show.
Step 6: View the Full Permissions List
Click the "Permissions" button to see the complete list of 60+ permissions. Use this to decide which permissions to assign to each designation.
Common Issues
| Problem | Solution |
|---|---|
| Staff doesn't see an option | Check if their designation has the related permission |
| "Access Denied" error | The staff member doesn't have the required permission |
| Permission change not taking effect | Wait for cache to clear (24 hrs) |
| Can't delete a designation | Reassign all staff from that designation first |