mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-14 05:29:43 +02:00
Fixed merge issues
This commit is contained in:
parent
7e0a4aea76
commit
19d173efd4
1 changed files with 6 additions and 6 deletions
|
@ -41,11 +41,15 @@ class DomainPermission(PermissionsLoginMixin):
|
||||||
if pk is None:
|
if pk is None:
|
||||||
raise ValueError("Primary key is None")
|
raise ValueError("Primary key is None")
|
||||||
|
|
||||||
# user needs to have a role on the domain
|
# user needs to have a role on the domain,
|
||||||
|
# and user cannot be restricted
|
||||||
if UserDomainRole.objects.filter(
|
if UserDomainRole.objects.filter(
|
||||||
user=self.request.user, domain__id=pk
|
user=self.request.user, domain__id=pk
|
||||||
).exists():
|
).exists() and not self.request.user.is_restricted():
|
||||||
return True
|
return True
|
||||||
|
elif self.request.user.is_restricted():
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
# ticket 806
|
# ticket 806
|
||||||
requested_domain = None
|
requested_domain = None
|
||||||
|
@ -87,10 +91,6 @@ class DomainPermission(PermissionsLoginMixin):
|
||||||
if can_do_action and user_is_analyst_or_superuser:
|
if can_do_action and user_is_analyst_or_superuser:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# The user has an ineligible flag
|
|
||||||
if self.request.user.is_restricted():
|
|
||||||
return False
|
|
||||||
|
|
||||||
# if we need to check more about the nature of role, do it here.
|
# if we need to check more about the nature of role, do it here.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue