diff --git a/platform/commonUI/browse/res/templates/browse-object.html b/platform/commonUI/browse/res/templates/browse-object.html
index 3632267df8..562f8bdf6a 100644
--- a/platform/commonUI/browse/res/templates/browse-object.html
+++ b/platform/commonUI/browse/res/templates/browse-object.html
@@ -44,7 +44,7 @@
diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js
index c6f890af0e..0844f65e67 100644
--- a/platform/commonUI/edit/src/representers/EditRepresenter.js
+++ b/platform/commonUI/edit/src/representers/EditRepresenter.js
@@ -109,6 +109,8 @@ define(
// Track the represented object
this.domainObject = representedObject;
+ this.scope.isEditable = representedObject.getCapability('status').get('editing');
+
// Ensure existing watches are released
this.destroy();
};
diff --git a/platform/commonUI/edit/test/representers/EditRepresenterSpec.js b/platform/commonUI/edit/test/representers/EditRepresenterSpec.js
index 8b0ef22a7d..79b336202a 100644
--- a/platform/commonUI/edit/test/representers/EditRepresenterSpec.js
+++ b/platform/commonUI/edit/test/representers/EditRepresenterSpec.js
@@ -33,6 +33,8 @@ define(
testRepresentation,
mockDomainObject,
mockPersistence,
+ mockCapabilities,
+ mockStatusCapability,
representer;
function mockPromise(value) {
@@ -57,11 +59,20 @@ define(
]);
mockPersistence =
jasmine.createSpyObj("persistence", ["persist"]);
+ mockStatusCapability =
+ jasmine.createSpyObj("status", ["get"]);
+ mockStatusCapability.get.andReturn(false);
+ mockCapabilities = {
+ 'persistence': mockPersistence,
+ 'status': mockStatusCapability
+ };
mockDomainObject.getModel.andReturn({});
mockDomainObject.hasCapability.andReturn(true);
mockDomainObject.useCapability.andReturn(true);
- mockDomainObject.getCapability.andReturn(mockPersistence);
+ mockDomainObject.getCapability.andCallFake(function(capability){
+ return mockCapabilities[capability];
+ });
representer = new EditRepresenter(mockQ, mockLog, mockScope);
representer.represent(testRepresentation, mockDomainObject);