improve osusers admin interface
- set user uid to readonly - set shadow password readonly - set can_delete on shadow to False
This commit is contained in:
parent
da8ba6ed1d
commit
9d447cac0b
1 changed files with 3 additions and 0 deletions
|
@ -14,10 +14,13 @@ class AdditionalGroupInline(admin.TabularInline):
|
|||
|
||||
class ShadowInline(admin.TabularInline):
|
||||
model = Shadow
|
||||
readonly_fields = ['passwd']
|
||||
can_delete = False
|
||||
|
||||
|
||||
class UserAdmin(admin.ModelAdmin):
|
||||
inlines = [AdditionalGroupInline, ShadowInline]
|
||||
readonly_fields = ['uid']
|
||||
|
||||
|
||||
admin.site.register(Group)
|
||||
|
|
Loading…
Reference in a new issue