Skip to content
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

Closes #15754: Remove staff_only=True from admin menu items #15784

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

jeremystretch
Copy link
Member

Fixes: #15754

  • Remove staff_only=True from all menu items
  • Add a warning to the API token edit view for non-superusers

There's an odd issue here where regular users will see the API token items under the admin menu, because by default all users have permission to create their own tokens. We also can't hide the menu item from non-superusers entirely, because it's valid to assign a non-superuser permissions to create tokens for specific other accounts (e.g. service accounts), which can only be done via the admin views. So, I've settled on displaying a warning for non-superusers directing them to create tokens using the relevant account views.

(Note that there's no security issue here: Attempting to create/modify a token for another user will fail just as it will in the current release. I just want to mitigate the inevitable confusion of having two paths to create a token.)

@jeremystretch jeremystretch requested a review from arthanson April 19, 2024 18:11
@jeremystretch jeremystretch merged commit 824d66a into feature Apr 19, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 15754-admin-menu-remove-staff_only branch April 19, 2024 18:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants