Skip to content

Conversation

@indrasuthar07
Copy link
Contributor

@indrasuthar07 indrasuthar07 commented Oct 14, 2025

Implemented a complete set of API endpoints for managing Roles and Permissions, restricted to Admin users.
This includes:
1.Roles CRUD (/api/roles)
2.Permissions CRUD (/api/permissions)
3.Assigning permissions to roles (/api/roles/:roleId/permissions)

All routes are protected by auth and RBAC middleware, accessible only to users with the Admin role.
Testing Done:
-Tested all endpoints locally using Postman with a valid Admin JWT token.
-Verified responses in Postman: creation of Role, creation of Permission, assigning Permission to Role, and fetching all roles.
Verified database updates in MongoDB Compass:
-roles collection contains the role(s) with assigned permissions.
-permissions collection contains all permissions created.

Screenshots:
Screenshot 2025-10-14 194853
Screenshot 2025-10-14 194905
Screenshot 2025-10-14 194917

Issues

closes #15

Checklist

@Somilg11
Copy link
Collaborator

Thank you for raising a PR. Due to the previous branch merge, there may be some conflicts; do check them out and resolve them. Thanks again for your contribution.
Do git pull -> resolve the conflicts -> commit the changes in the same

@indrasuthar07
Copy link
Contributor Author

Done sir

@Somilg11 Somilg11 merged commit 17de288 into OPCODE-Open-Spring-Fest:main Oct 15, 2025
2 checks passed
@nsh07
Copy link
Member

nsh07 commented Nov 6, 2025

@Somilg11 there is a mismatch in the difficulty level of this PR (medium) and the difficulty level of the corresponding issue (hard), so @indrasuthar07 will only receive points according to the PR's difficulty (medium). Is this intentional? If not, do let me know and I will update the score accordingly.

@Somilg11
Copy link
Collaborator

Somilg11 commented Nov 6, 2025

Do update the score, according to type hard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Implement Admin Endpoints for Role/Permission Management

3 participants