From 96433b07d41e20b0338afc22e9abd4b5bf88f871 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Thu, 11 Dec 2014 13:47:10 -0500 Subject: [PATCH] Incorrect object reference in Custom Inventory Script read acl for non-super-users --- awx/main/access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/access.py b/awx/main/access.py index 28e0e4ecf6..2159af6c5b 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -1471,7 +1471,7 @@ class CustomInventoryScriptAccess(BaseAccess): def can_read(self, obj): if self.user.is_superuser: return True - if not self.active: + if not obj.active: return False return bool(obj.organization in self.user.organizations.all() or obj.organization in self.user.admin_of_organizations.all())