Skip to content

User Roles and Permissions

Note: Roles are stored in the role table with values: manager, courier, warehouse, operator, user. The value manager in code corresponds to the admin role in the database (tenant administrator, not super admin).

Role Definitions

Manager (stored as admin in DB)

Tenant administrator with full access to tenant settings.

Permission Allowed
Manage tenant settings ✅
View all tenant data ✅
Manage users ✅
System configuration ✅
Delete data ❌

Warehouse

Warehouse operator for package handling and bag management.

Permission Allowed
Create shipments ✅
Update shipments ✅
Assign to bags ✅
Manage warehouse ✅
View reports ✅
Delete data ❌

Operator

General operator for shipments and warehouse operations.

Permission Allowed
Create shipments ✅
Update shipments ✅
Assign to bags ✅
Manage warehouse ✅
View reports ✅
Delete data ❌

Courier

Field operations for delivery.

Permission Allowed
View assigned shipments ✅
Scan QR codes ✅
Update delivery status ✅
View flight info ✅
Create shipments Own only
Access others' data ❌

User

Basic user with limited access.

Permission Allowed
View shipments Own only
View flights ✅
View reports ✅
Modify data ❌

Permission Matrix

Feature Manager Warehouse Operator Courier User
Tenant Settings ✅ ❌ ❌ ❌ ❌
Shipments - Create ✅ ✅ ✅ Own ❌
Shipments - Read All All All Own Own
Shipments - Update ✅ ✅ ✅ Status ❌
Shipments - Delete ✅ ❌ ❌ ❌ ❌
Bags - Manage ✅ ✅ ✅ ❌ ❌
Flights - Track ✅ ✅ ✅ ✅ ✅
Scans - Create ✅ ✅ ✅ ✅ ❌
Users - Manage ✅ ❌ ❌ ❌ ❌

Role Hierarchy

Manager (admin in DB)
  └── Warehouse
       └── Operator
            └── Courier
                 └── User

Lower roles inherit permissions from higher roles (plus their own restrictions).