mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 10:29:23 +02:00
Add corrected delete logic
This commit is contained in:
parent
c1daa455ae
commit
4b8f77436d
2 changed files with 19 additions and 5 deletions
|
@ -796,6 +796,12 @@ class DomainRequestDeleteView(DomainRequestPermissionDeleteView):
|
|||
if status not in valid_statuses:
|
||||
return False
|
||||
|
||||
# Portfolio users cannot delete their requests if they aren't permissioned to do so
|
||||
if self.request.user.is_org_user(self.request):
|
||||
portfolio = self.request.session.get("portfolio")
|
||||
if not self.request.user.has_edit_request_portfolio_permission(portfolio):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def get_success_url(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue