Throw an error when running an inventory update against an inventory

script that has been deleted
This commit is contained in:
Matthew Jones
2014-12-03 16:09:38 -05:00
parent c095ebcbfb
commit e05f9e081c
2 changed files with 4 additions and 1 deletions

View File

@@ -1471,6 +1471,8 @@ class CustomInventoryScriptAccess(BaseAccess):
def can_read(self, obj):
if self.user.is_superuser:
return True
if not self.active:
return Flase
return bool(obj.organization in self.user.organizations.all() or obj.organization in self.user.admin_of_organizations.all())
def can_add(self, data):