From 202704722005fbdeb4fc589a4228f58f39b4be22 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Thu, 31 Aug 2017 10:42:16 -0400 Subject: [PATCH] fix bug with host_filter RBAC check --- awx/main/access.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/awx/main/access.py b/awx/main/access.py index fe0c34b812..d73b877389 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -605,9 +605,7 @@ class InventoryAccess(BaseAccess): # Host filter may only be modified by org admin level org_admin_mandatory = False new_host_filter = data.get('host_filter', None) if data else None - if new_host_filter == '': # Provision for field 'blank' behavior - new_host_filter = None - if new_host_filter != obj.host_filter: + if new_host_filter and new_host_filter != obj.host_filter: org_admin_mandatory = True # Verify that the user has access to the new organization if moving an # inventory to a new organization. Otherwise, just check for admin permission.