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

feat(auth): decouple authorization and admin layout #13

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

jescalada
Copy link
Collaborator

@jescalada jescalada commented Feb 11, 2025

This PR for #9 builds on top of #7 and #10, making route access more intuitive. All /admin routes have been replaced with /dashboard, and relevant files have been renamed. Actual admin-only routes, such as the list of users, are displayed with the /admin/ prefix. For example: /dashboard/admin/user.

Merging the first two PRs should make this one more manageable! 😃

Unit tests execute the same way as before, and E2E tests have been expanded and amended to work with the new setup.

I also added some quality-of-life features, such as fixing the redirect on login, which had a confusing flow (that was erroring out when logging from the admin/admin account).

When testing, keep in mind that enabling OIDC will make some tests fail. Please set the local auth in proxy.config.json to enabled: true (and openidconnect to enabled: false) to make tests pass. Thank you!

Changelog

  • Refactor "admin" layout/routes into "dashboard"
  • Fix redirect on login (now redirects to repo list, which requires a logged-in user)
  • Fix error handling on repo page
    • Catches GitHub repo retrieval error and makes it more descriptive
  • Add new E2E test for basic login flow (with admin/admin account) and redirect
  • Fix login command
    • Needed to fix the existing repo E2E test which now requires a logged-in user

@jescalada jescalada self-assigned this Feb 11, 2025
@jescalada jescalada linked an issue Feb 11, 2025 that may be closed by this pull request
@jescalada jescalada changed the title Decouple authorization and admin layout feat(auth): decouple authorization and admin layout Mar 10, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (main@585cda6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/service/routes/auth.js 50.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #13   +/-   ##
=======================================
  Coverage        ?   61.88%           
=======================================
  Files           ?       49           
  Lines           ?     1805           
  Branches        ?        0           
=======================================
  Hits            ?     1117           
  Misses          ?      688           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jescalada and others added 7 commits March 10, 2025 13:35
…-plugin-samples - plugins/git-proxy-plugin-samples/package.json
…ples-manager

chore(deps): update dependency @finos/git-proxy to ^1.9.3 - git-proxy-plugin-samples - plugins/git-proxy-plugin-samples/package.json
fix(deps): update dependency axios to ^1.8.4 - git-proxy-cli - packages/git-proxy-cli/package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decouple route authorization and layout
3 participants