[New Edit Mode] #659 Fix to prevent multi-composition with same object, fix to prevent composition of object with self
This commit is contained in:
@@ -55,11 +55,12 @@ define(
|
||||
this.policyService = this.policyService || this.getPolicyService();
|
||||
|
||||
// ...and delegate to the composition policy
|
||||
return this.policyService.allow(
|
||||
'composition',
|
||||
containerType,
|
||||
selectedType
|
||||
);
|
||||
return containerObject.getId() !== selectedObject.getId() &&
|
||||
this.policyService.allow(
|
||||
'composition',
|
||||
containerType,
|
||||
selectedType
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user