Verified Commit 0295896c authored by erdnaxe's avatar erdnaxe 🎇

Do not subscribe user protected models to admin

parent 4e10fc5c
Pipeline #1142 passed with stage
in 2 minutes and 58 seconds
...@@ -35,39 +35,9 @@ from .models import ( ...@@ -35,39 +35,9 @@ from .models import (
Ban, Ban,
Whitelist, Whitelist,
Request, Request,
LdapUser,
LdapServiceUser,
LdapServiceUserGroup,
LdapUserGroup
) )
class LdapUserAdmin(admin.ModelAdmin):
"""Administration du ldapuser"""
list_display = ('name', 'uidNumber', 'login_shell')
exclude = ('user_password', 'sambat_nt_password')
search_fields = ('name',)
class LdapServiceUserAdmin(admin.ModelAdmin):
"""Administration du ldapserviceuser"""
list_display = ('name',)
exclude = ('user_password',)
search_fields = ('name',)
class LdapUserGroupAdmin(admin.ModelAdmin):
"""Administration du ldapusergroupe"""
list_display = ('name', 'members', 'gid')
search_fields = ('name',)
class LdapServiceUserGroupAdmin(admin.ModelAdmin):
"""Administration du ldap serviceusergroup"""
list_display = ('name',)
search_fields = ('name',)
@admin.register(School) @admin.register(School)
class SchoolAdmin(VersionAdmin): class SchoolAdmin(VersionAdmin):
"""Manage all schools in admin""" """Manage all schools in admin"""
...@@ -204,10 +174,6 @@ admin.site.register(User, UserAdmin) ...@@ -204,10 +174,6 @@ admin.site.register(User, UserAdmin)
admin.site.register(Adherent, UserAdmin) admin.site.register(Adherent, UserAdmin)
admin.site.register(Club, UserAdmin) admin.site.register(Club, UserAdmin)
admin.site.register(ServiceUser, ServiceUserAdmin) admin.site.register(ServiceUser, ServiceUserAdmin)
admin.site.register(LdapUser, LdapUserAdmin)
admin.site.register(LdapUserGroup, LdapUserGroupAdmin)
admin.site.register(LdapServiceUser, LdapServiceUserAdmin)
admin.site.register(LdapServiceUserGroup, LdapServiceUserGroupAdmin)
admin.site.register(ListRight, ListRightAdmin) admin.site.register(ListRight, ListRightAdmin)
admin.site.register(EMailAddress, EMailAddressAdmin) admin.site.register(EMailAddress, EMailAddressAdmin)
admin.site.register(Request, RequestAdmin) admin.site.register(Request, RequestAdmin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment