NexGenStudioDev / NexGenStudioDev/ciitm-frontend
Create Page for Admin Role Assignment & Access Control
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
The Admin Role Management page includes the following functionality:
- ✅ Assign Admin role to other users by entering their email.
- 📄 View a list of all users who currently have the Admin role (including their name and email).
- ❌ Revoke Admin access from other Admin users (excluding self, ideally).
This feature ensures only trusted users can manage administrative privileges, enhancing overall security and control within the application.
🎯 Objectives
- ✅ Assign Admin role to a user by email.
- 📄 Display a list of all current Admin users.
- ❌ Allow Admins to delete/revoke another Admin’s access.
🔐 Access Control
- This page is restricted to authenticated users with the Admin role.
- If a non-admin user attempts to access the page:
- They should be redirected to a safe route (e.g., dashboard or homepage), or
- They should see an "Access Denied" message.
🔗 API Integration
🔸 1. Assign Admin Role
- Endpoint:
POST /api/v1/role/create
Payload:
{
"email": "user@example.com"
}
🔹 2. Get All Admins
- (Assumed endpoint):
GET /api/v1/role/admins - Response Example:
[
{
"name": "John Doe",
"email": "john@example.com",
"role": "admin"
},
...
]
🔻 3. Delete Admin Role
- (Assumed endpoint):
DELETE /api/v1/role/admin/:email - Params: Admin email to revoke access from
- ❗ Make sure backend prevents an admin from deleting their own role unless intended.
Issue Number
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Admin Role Management page requirements and the listed role API endpoints: POST /api/v1/role/create, GET /api/v1/role/admins, and DELETE /api/v1/role/admin/:email. Check how authenticated and admin-only routes are handled in the frontend before connecting the page. Done means admins can assign, view, and revoke roles while non-admins are redirected or shown an access-denied message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- authorization, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100