mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 07:00:49 +00:00
[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:
parent
ad60b9225e
commit
49b983cd3a
@ -46,7 +46,9 @@ define(
|
|||||||
var domainObject = context.domainObject,
|
var domainObject = context.domainObject,
|
||||||
selectedObject = context.selectedObject,
|
selectedObject = context.selectedObject,
|
||||||
spaces = [ domainObject, selectedObject ].map(lookupSpace);
|
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) {
|
CrossSpacePolicy.prototype.allow = function (action, context) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user