Actions
Bug #19
closedBroken Access Control: Non-Super Admin Can Create Admin Users via API
Status:
Closed
Priority:
High
Assignee:
-
Description
A non-superadmin user (Intakes Staff role) is able to create new admin accounts by directly calling the /api/admin/add-admin API endpoint.
This indicates missing backend authorization checks, as admin creation should be restricted to superadmin users only.
Steps to Reproduce
- Login as a user with Intakes Staff role
- Capture the JWT token
- Send POST request to:
/api/admin/add-admin - Observe that admin account is successfully created
Expected Result
Only Super Admin should be able to create admin users.
Actual Result
Non-superadmin user is able to create admin users successfully.
NOTE: A Postman request has been created and shared to demonstrate the issue for easier reproduction.
Files
Actions