mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Exclude permission, userconfig inlines when creating a new user
This commit is contained in:
parent
8517434733
commit
ccb2bf4344
@ -87,9 +87,13 @@ class UserAdmin(UserAdmin_):
|
||||
}),
|
||||
('Important dates', {'fields': ('last_login', 'date_joined')}),
|
||||
)
|
||||
inlines = [UserObjectPermissionInline, UserConfigInline]
|
||||
filter_horizontal = ('groups',)
|
||||
|
||||
def get_inlines(self, request, obj):
|
||||
if obj is not None:
|
||||
return (UserObjectPermissionInline, UserConfigInline)
|
||||
return ()
|
||||
|
||||
|
||||
#
|
||||
# REST API tokens
|
||||
|
Loading…
Reference in New Issue
Block a user