Fix a bug where we allowed adding a group as a child of a

deleted/inactive group
This commit is contained in:
Matthew Jones
2014-05-23 14:23:01 -04:00
parent 54713b1a2e
commit 12ecc46398
2 changed files with 16 additions and 2 deletions

View File

@@ -429,6 +429,9 @@ class GroupAccess(BaseAccess):
if not super(GroupAccess, self).can_attach(obj, sub_obj, relationship,
data, skip_sub_obj_read_check):
return False
# Don't allow attaching if the sub obj is not active
if not obj.active:
return False
# Prevent assignments between different inventories.
if obj.inventory != sub_obj.inventory:
raise ParseError('Cannot associate two items from different inventories')