Let admin can delete user's environment
Now admin can see the list of user's environments, but can't delete them. There will gives the 403 Forbidden. This patch let admin can delete user's environment. Change-Id: Ic208ae586427bb3eb9ce4749870158ccdfb09d76 Closes-Bug: #1654103
This commit is contained in:
parent
2eb086769f
commit
5470550b5e
@ -40,7 +40,8 @@ def check_env(request, environment_id):
|
||||
raise exc.HTTPNotFound(explanation=msg)
|
||||
|
||||
if hasattr(request, 'context'):
|
||||
if environment.tenant_id != request.context.tenant:
|
||||
if (environment.tenant_id != request.context.tenant and not
|
||||
request.context.is_admin):
|
||||
msg = _('User is not authorized to access'
|
||||
' these tenant resources')
|
||||
LOG.error(msg)
|
||||
|
4
releasenotes/notes/bug-1654103-f39ee721d1b90b68.yaml
Normal file
4
releasenotes/notes/bug-1654103-f39ee721d1b90b68.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Now admin can delete user's environments.
|
Loading…
Reference in New Issue
Block a user