mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 01:27:03 +02:00
revert back tests from is_staff to has_perm
This commit is contained in:
parent
0c05518d61
commit
3580e070a3
3 changed files with 11 additions and 15 deletions
|
@ -842,12 +842,11 @@ class DomainAdmin(ListHeaderAdmin):
|
|||
# Fixes a bug wherein users which are only is_staff
|
||||
# can access 'change' when GET,
|
||||
# but cannot access this page when it is a request of type POST.
|
||||
# if request.user.has_perm(
|
||||
# "registrar.full_access_permission"
|
||||
# ) or request.user.has_perm(
|
||||
# "registrar.analyst_access_permission"
|
||||
# ):
|
||||
if request.user.is_staff:
|
||||
if request.user.has_perm(
|
||||
"registrar.full_access_permission"
|
||||
) or 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