mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 04:29:21 -02:30
fix bug with host_filter RBAC check
This commit is contained in:
@@ -605,9 +605,7 @@ class InventoryAccess(BaseAccess):
|
|||||||
# Host filter may only be modified by org admin level
|
# Host filter may only be modified by org admin level
|
||||||
org_admin_mandatory = False
|
org_admin_mandatory = False
|
||||||
new_host_filter = data.get('host_filter', None) if data else None
|
new_host_filter = data.get('host_filter', None) if data else None
|
||||||
if new_host_filter == '': # Provision for field 'blank' behavior
|
if new_host_filter and new_host_filter != obj.host_filter:
|
||||||
new_host_filter = None
|
|
||||||
if new_host_filter != obj.host_filter:
|
|
||||||
org_admin_mandatory = True
|
org_admin_mandatory = True
|
||||||
# Verify that the user has access to the new organization if moving an
|
# Verify that the user has access to the new organization if moving an
|
||||||
# inventory to a new organization. Otherwise, just check for admin permission.
|
# inventory to a new organization. Otherwise, just check for admin permission.
|
||||||
|
|||||||
Reference in New Issue
Block a user