Update: 2026-05-04 01:33:55
This commit is contained in:
@@ -19,7 +19,7 @@ $data = input();
|
||||
// 1. Role Authorization check (Prevent Role Escalation)
|
||||
$allowedRoles = match($decoded['role']) {
|
||||
'super_admin' => ['super_admin', 'admin', 'accountant', 'employee', 'viewer'],
|
||||
'admin' => ['accountant', 'employee', 'viewer'],
|
||||
'admin' => ['accountant', 'employee', 'viewer'], // Cannot create other admins
|
||||
default => []
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user