mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
Update admin.py
This commit is contained in:
parent
b942d34892
commit
2150873ec1
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue