- Notifications
You must be signed in to change notification settings - Fork1k
feat: show dialog with a redirect if permissions are required#16661
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 like it!
})=>{ | ||
if(!isFeatureVisible){ | ||
return<Navigateto="/workspaces"/>; | ||
// return <Navigate to="/workspaces" />; |
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.
// return <Navigate to="/workspaces" />; |
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.
🤦
39f42bc
intomainUh oh!
There was an error while loading.Please reload this page.
Closesthis issue
New behavior
When a user ends up on a page they don't have permission to view instead of being redirected back to/workspaces they'll be met with the un-closeable dialog below with a link to/workspaces.
This is similar tothis PR but IMO we should be making sure we are using
<RequirePermissions />
wherever applicable and only relying on<ErrorAlert />
as a fallback in case there is some page we missed or endpoint we're accidentally using.