Jan Dittberner
3babbc5b3f
- add app ldapentities - add new settings GROUP_BASE_DN and USER_BASE_DN - implement ldapentities.models.LdapUser and ldapentities.models.LdapGroup - implement ldapentities.admin.LdapUserAdmin and ldapentities.models.LdapGroupAdmin
23 lines
465 B
Python
23 lines
465 B
Python
from django.contrib import admin
|
|
|
|
from .models import (
|
|
LdapGroup,
|
|
LdapUser,
|
|
)
|
|
|
|
|
|
class LdapGroupAdmin(admin.ModelAdmin):
|
|
exclude = ['dn', 'members']
|
|
list_display = ['name', 'gid']
|
|
search_fields = ['name']
|
|
|
|
|
|
class LdapUserAdmin(admin.ModelAdmin):
|
|
exclude = ['dn', 'password']
|
|
list_display = ['username', 'uid']
|
|
search_fields = ['username']
|
|
|
|
|
|
admin.site.register(LdapGroup, LdapGroupAdmin)
|
|
admin.site.register(LdapUser, LdapUserAdmin)
|