Resolved merge conflicts

This commit is contained in:
Henry
2016-05-12 16:07:39 -07:00
parent cf9eb3f602
commit 433dd87e51
8 changed files with 59 additions and 19 deletions

View File

@@ -35,11 +35,12 @@ define([], function () {
}
EditableLinkPolicy.prototype.allow = function (action, context) {
var key = action.getMetadata().key;
var key = action.getMetadata().key,
object;
if (key === 'link') {
return !((context.selectedObject || context.domainObject)
.hasCapability('editor'));
object = context.selectedObject || context.domainObject;
return !(object.hasCapability("editor") && object.getCapability("editor").isEditing());
}
// Like all policies, allow by default.

View File

@@ -37,8 +37,8 @@ define([], function () {
selectedObject = context.selectedObject,
key = action.getMetadata().key;
if (key === 'move' && domainObject.hasCapability('editor')) {
return !!selectedObject && selectedObject.hasCapability('editor');
if (key === 'move' && domainObject.hasCapability('editor') && domainObject.getCapability('editor').isEditing()) {
return !!selectedObject && selectedObject.hasCapability('editor') && selectedObject.getCapability('editor').isEditing();
}
// Like all policies, allow by default.

View File

@@ -37,7 +37,7 @@ define(
// If a view is flagged as non-editable, only allow it
// while we're not in Edit mode.
if ((view || {}).editable === false) {
return !domainObject.hasCapability('editor');
return !(domainObject.hasCapability('editor') && domainObject.getCapability('editor').isEditing());
}
// Like all policies, allow by default.