Prevent deleting organizations on basic licenses

Plus unit tests
This commit is contained in:
Matthew Jones
2015-10-12 14:51:36 -04:00
parent 4c14827f46
commit 46aa6dfabb
3 changed files with 24 additions and 0 deletions

View File

@@ -262,6 +262,7 @@ class OrganizationAccess(BaseAccess):
self.user in obj.admins.all())
def can_delete(self, obj):
self.check_license(feature='multiple_organizations')
return self.can_change(obj, None)
class InventoryAccess(BaseAccess):