feat(remixer): add isCopyModeAdmin prop to ControlPanel for condition… - #962
Merged
Merged
Conversation
…al rendering Introduced the isCopyModeAdmin prop to ControlPanelNewUITemp, allowing the Select component for copy modes to render conditionally based on the user's admin status. This change simplifies the copy mode options for non-admin users and enhances the user interface by ensuring only relevant options are displayed.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the permission regression and enforce copy-mode authorization server-side.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds role-based conditional rendering for the Remixer copy-mode selector.
Changes:
- Adds
isCopyModeAdmintoControlPanelNewUITemp. - Passes super-admin status from
RemixerDashboard. - Hides copy-mode options for unauthorized users.
| File | Summary |
|---|---|
client/src/components/remixer/RemixerDashboard.tsx |
Supplies copy-mode authorization; review comments note a support-user permission regression (moderate) and missing server-side enforcement (critical). |
client/src/components/remixer/ControlPanel.tsx |
Conditionally renders the copy-mode selector based on authorization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
🎉 This PR is included in version 2.152.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


conditional rendering
Introduced the isCopyModeAdmin prop to ControlPanelNewUITemp, allowing the Select component for copy modes to render conditionally based on the user's admin status. This change simplifies the copy mode options for non-admin users and enhances the user interface by ensuring only relevant options are displayed.