Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Spring Security for Admin and User Roles, Refactor Controllers, and Add Custom 403 Page #80

Merged

Conversation

Guhapriya01
Copy link

This pull request includes the following changes:

  1. Spring Security Configuration:

    • Added a SecurityConfiguration class to manage security for admin and user roles.
    • Configured two separate security filter chains:
      • Admin routes (/admin/**) are restricted to users with the ADMIN role.
      • User routes (/**) are restricted to users with the USER role.
    • Integrated existing login and logout pages with Spring Security for authentication and authorization.
  2. Controller Updates:

    • Refactored Admin and User controllers to align with the new security configurations.
    • Replaced previous controller-specific logic for admin access with Spring Security configurations.
  3. View and Navigation Updates:

    • Modified JSP pages for admin and user interfaces to match the updated controllers and security settings.
    • Updated navigation links to reflect changes in security and routing.
  4. Error Handling:

    • Added a custom 403 error page for access denial scenarios.
    • Implemented an error controller to serve the 403 error page.

Related Issues:

Please review and let me know if any further changes are needed.

@NisargPipaliya NisargPipaliya merged commit 08b89fb into jaygajera17:master2 Sep 13, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants