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