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

Enable controlling the display of navigation menu items depending on the user's is_staff status #13638

Closed
jeremystretch opened this issue Aug 31, 2023 · 0 comments · Fixed by #13639
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.6.0

Feature type

New functionality

Proposed functionality

Add an optional staff_only attribute to the MenuItem class, which defaults to False if not set. Any navigation menu item for which staff_only is True will be displayed only if the user's is_staff field is True.

(I also considered proposing a superuser_only attribute, but worried that might encourage poor practice concerning the assignment of permissions.)

Use case

This will allow more fine-grained control over the display of individual menu items, beyond the permissions evaluation logic that's currently in place.

This was prompted by and is necessary to resolve #13620.

Database changes

N/A

External dependencies

N/A

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Aug 31, 2023
@jeremystretch jeremystretch self-assigned this Aug 31, 2023
@jeremystretch jeremystretch changed the title Enable controliing the display of navigation menu items depending on the user's is_staff status Enable controlling the display of navigation menu items depending on the user's is_staff status Aug 31, 2023
jeremystretch added a commit that referenced this issue Aug 31, 2023
* Closes #13638: Add optional staff_only attribute to MenuItem

* Add missing file

* Add release note
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant