Update admin.py

This commit is contained in:
zandercymatics 2024-04-02 13:00:46 -06:00
parent b942d34892
commit 2150873ec1
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1409,6 +1409,8 @@ class DomainInformationInline(admin.StackedInline):
]
def has_change_permission(self, request, obj=None):
"""Custom has_change_permission override so that we can specify that
analysts can edit this through this inline, but not through the model normally"""
if request.user.has_perm("registrar.analyst_access_permission"):
return True
return super().has_change_permission(request, obj)