-
-
Notifications
You must be signed in to change notification settings - Fork 729
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(cjux-278): maintenance root roles #8875
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
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.
How did you test it? Manually?
@@ -6,10 +6,11 @@ import { Box, styled } from '@mui/material'; | |||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; | |||
import { MaintenanceTooltip } from './MaintenanceTooltip'; | |||
import { MaintenanceToggle } from './MaintenanceToggle'; | |||
import { UPDATE_MAINTENANCE_MODE } from '@server/types/permissions'; |
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 didn't know we could import stuff from the server? Should it go in AccessProvider/permissions
to be consistent with how we're doing it today? I think only defining it in one place is cool, though, but why is it not something we're already doing?
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.
Thanks for noticing this. It needs refactoring. I'll post another PR, because it turns out there are inconsistencies all over this.
export const MAINTENANCE_MODE_PERMISSIONS = [ | ||
ADMIN, | ||
READ_ROLE, | ||
READ_CLIENT_API_TOKEN, | ||
READ_FRONTEND_API_TOKEN, | ||
UPDATE_MAINTENANCE_MODE, |
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.
How does this work? Do you need one of them or all of them? Seems a little strange to gain access to the full admin panel if you have read client API token only? Maybe I'm misunderstanding how this works?
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.
Custom root roles for changing maintenance mode state and banners.
Internal ticket: CJUX-278