-
Notifications
You must be signed in to change notification settings - Fork 45.3k
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: backend admin page logic was broken #9616
base: dev
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
Here's the code health analysis summary for commits Analysis Summary
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
if (!user) { | ||
// Check if the user is trying to access either a protected page or an admin page | ||
const isAttemptingProtectedPage = PROTECTED_PAGES.some((page) => | ||
request.nextUrl.pathname.startsWith(page), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we trim the initial slashes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think so? why would we vs not?
…ttps://github.com/Significant-Gravitas/AutoGPT into ntindle/secrt-1139-verify-if-auth-pages-still-work
We're building out admin utilities so we need to bring back the
/admin
route with RBAC. This PR goes through re-enabling that to work with the latest changesChanges 🏗️
Checklist 📋
For code changes:
middleware.ts