revert permissions tests in views and admin for is_staff

This commit is contained in:
Rachid Mrad 2023-09-29 18:25:47 -04:00
parent ef88f7b148
commit 128f619e14
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
3 changed files with 15 additions and 11 deletions

View file

@ -837,11 +837,12 @@ 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"
) or request.user.is_staff:
# if request.user.has_perm(
# "registrar.full_access_permission"
# ) or request.user.has_perm(
# "registrar.analyst_access_permission"
# ):
if request.user.is_staff:
return True
return super().has_change_permission(request, obj)