Coverage for benefits/core/admin/claims.py: 100%
2 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-30 22:14 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-30 22:14 +0000
1from django.contrib import admin
3from benefits.core import models
6@admin.register(models.ClaimsProvider)
7class ClaimsProviderAdmin(admin.ModelAdmin): # pragma: no cover
8 def get_exclude(self, request, obj=None):
9 if not request.user.is_superuser:
10 return ["client_id_secret_name"]
11 else:
12 return super().get_exclude(request, obj)
14 def get_readonly_fields(self, request, obj=None):
15 if not request.user.is_superuser:
16 return [
17 "sign_out_button_template",
18 "sign_out_link_template",
19 "authority",
20 "scheme",
21 ]
22 else:
23 return super().get_readonly_fields(request, obj)