Skip to content

fix(toolbar): hide keyboard shortcuts dialog for viewer-role users#1167

Merged
perber merged 4 commits into
mainfrom
fix/hide-shortcuts-dialog-for-viewer-role
Jun 17, 2026
Merged

fix(toolbar): hide keyboard shortcuts dialog for viewer-role users#1167
perber merged 4 commits into
mainfrom
fix/hide-shortcuts-dialog-for-viewer-role

Conversation

@perber

@perber perber commented Jun 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 16, 2026 17:12

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.

Pull request overview

This PR updates the LeafWiki UI user toolbar to prevent viewer-role (read-only) users from accessing the Keyboard Shortcuts help dialog, aligning shortcuts-help access with role-based permissions.

Changes:

  • Skip registering the shortcuts.help.open hotkey when the session is in read-only mode (viewer role).
  • Hide the “Keyboard Shortcuts” dropdown menu item unless the user is admin or editor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/components/UserToolbar.tsx
Comment thread ui/leafwiki-ui/src/components/UserToolbar.tsx
@perber
perber merged commit 8f3127d into main Jun 17, 2026
9 checks passed
@perber
perber deleted the fix/hide-shortcuts-dialog-for-viewer-role branch June 19, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants