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.