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: admin pages accessible by non admin users #2988

Conversation

Kuchenpirat
Copy link
Collaborator

What type of PR is this?

  • bug

What this PR does / why we need it:

This reroutes users that are authenticated, but not admins back to the homepage if they acces one of the admin pages directly though an url (eg. /admin/backups).

Which issue(s) this PR fixes:

Testing

Manual testing by going to the relevant pages as "bob" a non admin user.

@michael-genson michael-genson enabled auto-merge (squash) January 14, 2024 15:57
Copy link
Collaborator

@michael-genson michael-genson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! Love the use of middleware

@michael-genson michael-genson merged commit 030588e into mealie-recipes:mealie-next Jan 14, 2024
9 checks passed
@Kuchenpirat Kuchenpirat deleted the fix-admin-pages-accessible-by-non-admin-users branch January 14, 2024 16:18
@Kuchenpirat Kuchenpirat mentioned this pull request Feb 2, 2024
28 tasks
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.

[BUG] - Non-admin users can navigate directly to admin pages via URL (even though they can't do anything)
2 participants