Skip to content

feat(remixer): add isCopyModeAdmin prop to ControlPanel for condition… - #962

Merged
jakeaturner merged 1 commit into
stagingfrom
fix/remixer-copymode-admin
Sep 22, 2026
Merged

jakeaturner merged 1 commit into
stagingfrom
fix/remixer-copymode-admin

Conversation

@yghaemi

@yghaemi yghaemi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

…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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds role-based conditional rendering for the Remixer copy-mode selector.

Changes:

  • Adds isCopyModeAdmin to ControlPanelNewUITemp.
  • 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.

Comment thread client/src/components/remixer/RemixerDashboard.tsx
Comment thread client/src/components/remixer/RemixerDashboard.tsx
@jakeaturner
jakeaturner merged commit 18c84cf into staging Sep 22, 2026
8 checks passed
@jakeaturner
jakeaturner deleted the fix/remixer-copymode-admin branch September 22, 2026 21:11
@libretexts-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.152.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants