mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-14 15:52:18 -06:00
Closes #16137: Remove is_staff boolean from User model (#20306)
Some checks are pending
CI / build (20.x, 3.12) (push) Waiting to run
CI / build (20.x, 3.13) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Some checks are pending
CI / build (20.x, 3.12) (push) Waiting to run
CI / build (20.x, 3.13) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
* Closes #16137: Remove is_staff boolean from User model * Remove default is_staff value from UserManager.create_user() * Restore staff_only on MenuItem * Introduce IsSuperuser API permission to replace IsAdminUser * Update and improve RQ task API view tests * Remove is_staff attribute assignment from RemoteUserBackend
This commit is contained in:
@@ -192,7 +192,7 @@ class UserForm(forms.ModelForm):
|
||||
fieldsets = (
|
||||
FieldSet('username', 'password', 'confirm_password', 'first_name', 'last_name', 'email', name=_('User')),
|
||||
FieldSet('groups', name=_('Groups')),
|
||||
FieldSet('is_active', 'is_staff', 'is_superuser', name=_('Status')),
|
||||
FieldSet('is_active', 'is_superuser', name=_('Status')),
|
||||
FieldSet('object_permissions', name=_('Permissions')),
|
||||
)
|
||||
|
||||
@@ -200,7 +200,7 @@ class UserForm(forms.ModelForm):
|
||||
model = User
|
||||
fields = [
|
||||
'username', 'first_name', 'last_name', 'email', 'groups', 'object_permissions',
|
||||
'is_active', 'is_staff', 'is_superuser',
|
||||
'is_active', 'is_superuser',
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user