[Composition] Disallow composition for leaf types
Disallow composition for domain object types which will not have a composition property; WTD-1221.
This commit is contained in:
@@ -45,8 +45,9 @@ define(
|
||||
properties = type.getProperties();
|
||||
|
||||
function validateLocation(locatingObject) {
|
||||
var locatingType = locatingObject.getCapability('type');
|
||||
return policyService.allow(
|
||||
var locatingType = locatingObject &&
|
||||
locatingObject.getCapability('type');
|
||||
return locatingType && policyService.allow(
|
||||
"composition",
|
||||
locatingType,
|
||||
type
|
||||
|
||||
Reference in New Issue
Block a user