mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
Merge pull request #1977 from cisagov/za/1924-remove-domain-info-for-analysts
Ticket #1924: Remove domain info for analysts
This commit is contained in:
commit
07f0fd9b93
5 changed files with 163 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