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

fix(login): Redirect after login based on user roles #1004

Merged
merged 7 commits into from
Jan 14, 2025

Conversation

tiffanyvu
Copy link
Collaborator

🎫 Linked Ticket

OY2-32210

💬 Description / Notes

Users with no appropriate roles were being redirected to the dashboard after login, however, the dashboard page should only accessible to users with appropriate roles. Users without these roles should be redirected to the homepage.

🛠 Changes

If a user logs in and doesn't have the appropriate roles, the user will be redirected to the home page instead of the dashboard.

📸 Screenshots / Demo

@tiffanyvu tiffanyvu requested a review from thetif January 10, 2025 17:39
Copy link
Contributor

github-actions bot commented Jan 10, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 83.94% 7412 / 8830
🔵 Statements 83.3% 7781 / 9340
🔵 Functions 78.06% 2239 / 2868
🔵 Branches 54.39% 1523 / 2800
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react-app/src/components/Layout/index.test.tsx 100% 64.28% 98.11% 100%
react-app/src/components/Layout/index.tsx 93.18% 94.59% 100% 95.12% 87, 259-260
Generated in workflow #1496 for commit 564411e by the Vitest Coverage Report Action

@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased January 13, 2025 19:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased January 13, 2025 19:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased-kibana January 13, 2025 19:28 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased January 13, 2025 19:28 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased January 13, 2025 19:28 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased January 13, 2025 19:28 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to redirect-login-rolebased-app January 13, 2025 19:28 — with GitHub Actions Inactive
@ndebrah-fearless ndebrah-fearless merged commit cec5f86 into main Jan 14, 2025
15 checks passed
@tiffanyvu tiffanyvu deleted the redirect-login-rolebased branch January 15, 2025 19:50
Copy link
Contributor

🎉 This PR is included in version 1.5.0-val.108 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants