feat: add RBAC with role-based endpoint protection and controller refactor - #42
feat: add RBAC with role-based endpoint protection and controller refactor#42exeaman wants to merge 3 commits into
Conversation
|
@exeaman is attempting to deploy a commit to the dav nguyen's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for employee-management-fullstack-system canceled.
|
There was a problem hiding this comment.
Code Review
This pull request implements Role-Based Access Control (RBAC) and refactors the backend architecture by delegating business logic from controllers to service components. Key changes include the integration of JWT-based security, role-based endpoint authorization, and new administrative user management features. Review feedback highlights several improvement opportunities, such as aligning exception types in the authentication service with the global handler, further simplifying controllers by delegating logic, eliminating redundant entity lookups, and adding necessary validation to request DTOs to ensure robustness.
exeaman
left a comment
There was a problem hiding this comment.
The basic RBAC implementation has been done along with some architectural improvements in MVC layers.
Overview
This pull request introduces Role-Based Access Control (RBAC) using Spring Security and refactors controllers by moving business logic to the service layer.
The goal is to improve security, maintainability, and align the codebase with standard backend design practices without breaking existing API contracts.
Related Issue/Ticket
N/A (feature enhancement)
Files Changed
Security
Controllers
Services
DTOs
Documentation
Testing
Screenshots (if applicable)
N/A (Backend changes only)
Notes to Reviewers
@PreAuthorizewith role-based authoritiesuserstable and enforced at the controller levelDeployment Notes