[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:
Victor Woeltjen
2015-06-03 13:46:25 -07:00
parent e452921729
commit 2648f01966
6 changed files with 64 additions and 3 deletions

View File

@@ -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