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:
Jan Dittberner 2014-05-24 23:15:14 +02:00
parent da8ba6ed1d
commit 9d447cac0b

View file

@ -14,10 +14,13 @@ class AdditionalGroupInline(admin.TabularInline):
class ShadowInline(admin.TabularInline): class ShadowInline(admin.TabularInline):
model = Shadow model = Shadow
readonly_fields = ['passwd']
can_delete = False
class UserAdmin(admin.ModelAdmin): class UserAdmin(admin.ModelAdmin):
inlines = [AdditionalGroupInline, ShadowInline] inlines = [AdditionalGroupInline, ShadowInline]
readonly_fields = ['uid']
admin.site.register(Group) admin.site.register(Group)