mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-20 11:29:25 +02:00
Merge branch 'za/1924-remove-domain-info-for-analysts' into za/1948-remove-draft-domain-and-websites
This commit is contained in:
commit
88ae1f92b1
5 changed files with 48 additions and 10 deletions
|
@ -1436,6 +1436,13 @@ class DomainInformationInline(admin.StackedInline):
|
|||
"submitter",
|
||||
]
|
||||
|
||||
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)
|
||||
|
||||
def formfield_for_manytomany(self, db_field, request, **kwargs):
|
||||
"""customize the behavior of formfields with manytomany relationships. the customized
|
||||
behavior includes sorting of objects in lists as well as customizing helper text"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue