[SL-259] Admin panel auth and role-based access control#290
Merged
MahadAhmed25 merged 4 commits intomainfrom Feb 12, 2026
Merged
[SL-259] Admin panel auth and role-based access control#290MahadAhmed25 merged 4 commits intomainfrom
MahadAhmed25 merged 4 commits intomainfrom
Conversation
Backend: - Add Roles decorator and RolesGuard for role-based access control - Gate users, stats, and events endpoints by role (Admin/Member) - Require password confirmation when changing a user's admin role - Add verifyUserPassword and replaceRoles to UsersService - Fix getUserTickets: allow self-access or Admin (keeps mobile app working) - Update seed data: remove Guest role, use @mcmaster.ca emails, add passwordHash - Extend CORS with methods used by admin panel Frontend web-admin: - Add login page, auth middleware, and token handling - Add JWT to API requests and logout in DashboardShell - Gate advanced settings to admins; show confirm + password for role changes - Replace raw JSON with friendly "Password is incorrect" message on error - Add getMe, updateUserRoles, login to API client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backend:
Frontend web-admin: