[Persistence] Fix cross-space policy

Fix logic in cross-space policy; only disallow when a move, copy
or link would really cross spaces.
This commit is contained in:
Victor Woeltjen 2015-11-10 10:57:48 -08:00
parent ad60b9225e
commit 49b983cd3a

View File

@ -46,7 +46,9 @@ define(
var domainObject = context.domainObject,
selectedObject = context.selectedObject,
spaces = [ domainObject, selectedObject ].map(lookupSpace);
return spaces[0] === spaces[1];
return selectedObject !== undefined &&
domainObject !== undefined &&
lookupSpace(domainObject) !== lookupSpace(selectedObject);
}
CrossSpacePolicy.prototype.allow = function (action, context) {