Skip to main content

Roles & Permissions

Role Hierarchy

RoleVietnameseAccess Level
bodBan Giám ĐốcFull access (Level 4)
warehouse_managerQuản Lý KhoWarehouse + HR (Level 3)
hrNhân SựHR functions (Level 3)
warehouse_leaderTrưởng CaOperations (Level 2)
staffNhân ViênRead-only own data (Level 1)

Action Permission Matrix

ActionStaffLeaderManagerHRBOD
View dashboard
Create violation
Confirm violation
Approve recovery
Approve bonus
Approve scores
Finalize scores
Manage config
Export CSV
View reports

Warehouse Scoping

  • BOD and HR accounts have access to all warehouses
  • Warehouse Manager and Leader accounts are scoped to their assigned warehouse
  • The warehouse_id field on the user profile determines data visibility

Auth Header

All API requests must include:

X-User-Id: <user_id>

The backend uses this header to determine the user's role and warehouse scope for data filtering.