Superuser is not an admin #7405

Closed
opened 2025-12-29 20:23:01 +01:00 by adam · 2 comments
Owner

Originally created by @jschewebbn on GitHub (Dec 21, 2022).

NetBox version

v3.4.1

Python version

3.8

Steps to Reproduce

In 3.1.7 users marked as superuser could use the Admin interface, even if not explicitly listed as staff. In 3.4.1 I found that I needed to make these users staff as well as superusers to edit the Admin interface.

Expected Behavior

I expect that superusers would be able to use the admin interface.

Observed Behavior

Superusers are not able to use the admin interface.

Originally created by @jschewebbn on GitHub (Dec 21, 2022). ### NetBox version v3.4.1 ### Python version 3.8 ### Steps to Reproduce In 3.1.7 users marked as superuser could use the Admin interface, even if not explicitly listed as staff. In 3.4.1 I found that I needed to make these users staff as well as superusers to edit the Admin interface. ### Expected Behavior I expect that superusers would be able to use the admin interface. ### Observed Behavior Superusers are not able to use the admin interface.
adam added the type: bug label 2025-12-29 20:23:01 +01:00
adam closed this issue 2025-12-29 20:23:01 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Dec 21, 2022):

In 3.1.7 users marked as superuser could use the Admin interface, even if not explicitly listed as staff.

I cannot replicate this.

I found that I needed to make these users staff as well as superusers to edit the Admin interface.

That is intended, it's in the documentation here: https://docs.netbox.dev/en/stable/administration/authentication/overview/#local-authentication

Local user accounts and groups can be created in NetBox under the "Authentication and Authorization" section of the administrative user interface. This interface is available only to users with the "staff" permission enabled.

I expect that superusers would be able to use the admin interface.

That would be a feature request, but it's very unlikely to happen, both because I think it works fine as is and secondly because it's how django.contrib.admin works:

https://docs.djangoproject.com/en/4.1/ref/contrib/admin/
https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.is_staff

By default, logging in to the admin requires that the user has the is_staff attribute set to True.

You could create a feature request to django and ask them to change it

@kkthxbye-code commented on GitHub (Dec 21, 2022): > In 3.1.7 users marked as superuser could use the Admin interface, even if not explicitly listed as staff. I cannot replicate this. > I found that I needed to make these users staff as well as superusers to edit the Admin interface. That is intended, it's in the documentation here: https://docs.netbox.dev/en/stable/administration/authentication/overview/#local-authentication > Local user accounts and groups can be created in NetBox under the "Authentication and Authorization" section of the administrative user interface. This interface is available only to users with the "staff" permission enabled. > I expect that superusers would be able to use the admin interface. That would be a feature request, but it's very unlikely to happen, both because I think it works fine as is and secondly because it's how django.contrib.admin works: https://docs.djangoproject.com/en/4.1/ref/contrib/admin/ https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.is_staff > By default, logging in to the admin requires that the user has the is_staff attribute set to True. You could create a feature request to django and ask them to change it
Author
Owner

@jschewebbn commented on GitHub (Dec 21, 2022):

OK, thanks for explaining it.

@jschewebbn commented on GitHub (Dec 21, 2022): OK, thanks for explaining it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7405