Add has change perm

This commit is contained in:
zandercymatics 2024-04-02 12:58:17 -06:00
parent d33cc1c8cc
commit b942d34892
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1408,6 +1408,11 @@ class DomainInformationInline(admin.StackedInline):
"submitter", "submitter",
] ]
def has_change_permission(self, request, obj=None):
if request.user.has_perm("registrar.analyst_access_permission"):
return True
return super().has_change_permission(request, obj)
def formfield_for_manytomany(self, db_field, request, **kwargs): def formfield_for_manytomany(self, db_field, request, **kwargs):
"""customize the behavior of formfields with manytomany relationships. the customized """customize the behavior of formfields with manytomany relationships. the customized
behavior includes sorting of objects in lists as well as customizing helper text""" behavior includes sorting of objects in lists as well as customizing helper text"""