admin: add is_staff and is_superuser in user edit view (#55452)
Also clean up user list view.
This commit is contained in:
parent
0ebab963bb
commit
8573ac08da
|
@ -107,19 +107,24 @@ class DocbowUserAdmin(auth_admin.UserAdmin):
|
|||
fieldsets = (
|
||||
(None, {'fields': ('username', 'password')}),
|
||||
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
|
||||
(_('Permissions'), {'fields': ('is_active',)}),
|
||||
(_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser')}),
|
||||
(_('Important dates'), {'fields': ('last_login', 'date_joined')}),
|
||||
(_('Groups'), {'fields': ('groups',)}),
|
||||
)
|
||||
readonly_fields = ['last_login', 'date_joined']
|
||||
exclude = ['user_permissions']
|
||||
actions = [actions.export_as_csv]
|
||||
list_display = auth_admin.UserAdmin.list_display + (
|
||||
'guest_account',
|
||||
list_display = (
|
||||
'username',
|
||||
'email',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'delegations',
|
||||
'get_groups',
|
||||
'get_lists',
|
||||
'get_groups',
|
||||
'is_active',
|
||||
'is_staff',
|
||||
'is_superuser',
|
||||
)
|
||||
inlines = [DocbowProfileInlineAdmin]
|
||||
|
||||
|
|
Loading…
Reference in New Issue