Skip to content

Commit

Permalink
feat(admin): specify fields to hide from Cal-ITP for TransitAgency
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Jul 16, 2024
1 parent 6882dff commit 30ce464
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benefits/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ def get_exclude(self, request, obj=None):

@admin.register(models.TransitAgency)
class TransitAgencyAdmin(admin.ModelAdmin):
pass
def get_exclude(self, request, obj=None):
if request.user.groups.contains(Group.objects.get(name=STAFF_GROUP_NAME)):
return [
"private_key",
"public_key",
"jws_signing_alg",
]
else:
return super().get_exclude(request, obj)


def pre_login_user(user, request):
Expand Down

0 comments on commit 30ce464

Please sign in to comment.