From d7dabc1e5ed00b1c46d3d4a07d6e8cf2923c9faa Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 20 Oct 2022 17:33:54 +0200 Subject: [PATCH] auth_oidc: remove admin views (#68429) --- src/authentic2_auth_oidc/admin.py | 48 ------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/authentic2_auth_oidc/admin.py diff --git a/src/authentic2_auth_oidc/admin.py b/src/authentic2_auth_oidc/admin.py deleted file mode 100644 index 5ba04ee6f..000000000 --- a/src/authentic2_auth_oidc/admin.py +++ /dev/null @@ -1,48 +0,0 @@ -# authentic2 - versatile identity manager -# Copyright (C) 2010-2020 Entr'ouvert -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - - -from django.contrib import admin - -from . import models -from .forms import OIDCClaimMappingForm - - -class OIDCClaimMappingInline(admin.TabularInline): - model = models.OIDCClaimMapping - form = OIDCClaimMappingForm - extra = 0 - - -class OIDCProviderAdmin(admin.ModelAdmin): - list_display = ['name', 'slug', 'client_id', 'ou', 'created', 'modified'] - inlines = [OIDCClaimMappingInline] - list_filter = ['ou'] - date_hierarchy = 'modified' - readonly_fields = ['created', 'modified'] - prepopulated_fields = {'slug': ('name',)} - - -class OIDCAccountAdmin(admin.ModelAdmin): - list_display = ['provider', 'user', 'sub', 'created', 'modified'] - search_fields = ['user__first_name', 'user__last_name', 'user__email', 'user__username'] - date_hierarchy = 'modified' - list_filter = ['provider'] - readonly_fields = ['provider', 'user', 'sub', 'created', 'modified'] - - -admin.site.register(models.OIDCProvider, OIDCProviderAdmin) -admin.site.register(models.OIDCAccount, OIDCAccountAdmin) -- 2.35.1