Skip to content

Commit

Permalink
feat(admin): specify fields to hide from Cal-ITP for PaymentProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Jul 16, 2024
1 parent 18da5b0 commit 5735c94
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 @@ -58,7 +58,15 @@ def get_exclude(self, request, obj=None):

@admin.register(models.PaymentProcessor)
class PaymentProcessorAdmin(admin.ModelAdmin):
pass
def get_exclude(self, request, obj=None):
if request.user.groups.contains(Group.objects.get(name=CALITP_GROUP_NAME)):
return [
"client_id",
"client_secret_name",
"audience",
]
else:
return super().get_exclude(request, obj)


@admin.register(models.TransitAgency)
Expand Down

0 comments on commit 5735c94

Please sign in to comment.