Removal of staff_only=True from Admin menu items #9494

Closed
opened 2025-12-29 20:50:39 +01:00 by adam · 1 comment
Owner

Originally created by @markkuleinio on GitHub (Apr 17, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.0-beta1

Feature type

Change to existing functionality

Proposed functionality

The proposal is to remove staff_only=True condition from Admin menu items.

Some additional changes will be required to ensure that a normal user (without Superuser access) does not see the Admin menu items where they don't have access anyway.

Use case

Currently, if a Superuser has the Staff status removed, the user cannot access the Admin menu items anymore.

Discussed in #15733. Related comments also in the mainteners meeting minutes in #15089

Database changes

None

External dependencies

None

Originally created by @markkuleinio on GitHub (Apr 17, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.0-beta1 ### Feature type Change to existing functionality ### Proposed functionality The proposal is to remove `staff_only=True` condition from Admin menu items. Some additional changes will be required to ensure that a normal user (without Superuser access) does not see the Admin menu items where they don't have access anyway. ### Use case Currently, if a Superuser has the Staff status removed, the user cannot access the Admin menu items anymore. Discussed in #15733. Related comments also in the mainteners meeting minutes in #15089 ### Database changes None ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 20:50:39 +01:00
adam closed this issue 2025-12-29 20:50:39 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 17, 2024):

Some additional context:

  • In NetBox v3.6, the UI views for managing users, groups, permissions, API tokens, and configuration revisions were moved from the "backend" Django admin UI to the primary UI.
  • In NetBox v4.0, the remaining admin views were relocated to the primary UI, and the Django admin UI is disabled by default. (It can still be enabled for plugins which require it.)
  • A custom user model was introduced in NetBox v4.0.

As our ultimate goal is to remove the Django admin UI from NetBox entirely, and as we now have the ability to customize fields on the user model, IMO we should drop the is_staff field entirely and rely on the permissions framework to control the display of individual navigation menu items.

@jeremystretch commented on GitHub (Apr 17, 2024): Some additional context: - In NetBox v3.6, the UI views for managing users, groups, permissions, API tokens, and configuration revisions were moved from the "backend" Django admin UI to the primary UI. - In NetBox v4.0, the remaining admin views were relocated to the primary UI, and the Django admin UI is disabled by default. (It can still be enabled for plugins which require it.) - A custom user model was introduced in NetBox v4.0. As our ultimate goal is to remove the Django admin UI from NetBox entirely, and as we now have the ability to customize fields on the user model, IMO we should drop the `is_staff` field entirely and rely on the permissions framework to control the display of individual navigation menu items.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9494