Incorrect object reference in Custom Inventory Script read acl for non-super-users

This commit is contained in:
Matthew Jones 2014-12-11 13:47:10 -05:00
parent 1c1aa1f807
commit 96433b07d4

View File

@ -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())