diff --git a/platform/features/table/src/TableConfiguration.js b/platform/features/table/src/TableConfiguration.js index 5b463ee7f1..fee22d47bc 100644 --- a/platform/features/table/src/TableConfiguration.js +++ b/platform/features/table/src/TableConfiguration.js @@ -187,7 +187,9 @@ define( }); //Synchronize column configuration with model - if (configChanged(configuration, defaultConfig)) { + if (this.domainObject.hasCapability('editor') && + this.domainObject.getCapability('editor').isEditContextRoot() && + configChanged(configuration, defaultConfig)) { this.saveColumnConfiguration(configuration); } diff --git a/platform/features/table/test/TableConfigurationSpec.js b/platform/features/table/test/TableConfigurationSpec.js index db90cc1c62..dcac2a9876 100644 --- a/platform/features/table/test/TableConfigurationSpec.js +++ b/platform/features/table/test/TableConfigurationSpec.js @@ -35,10 +35,18 @@ define( beforeEach(function () { mockDomainObject = jasmine.createSpyObj('domainObject', - ['getModel', 'useCapability', 'getCapability'] + ['getModel', 'useCapability', 'getCapability', 'hasCapability'] ); mockModel = {}; mockDomainObject.getModel.andReturn(mockModel); + mockDomainObject.getCapability.andCallFake(function (name) { + return name === 'editor' && { + isEditContextRoot: function () { + return true; + } + }; + }); + mockTelemetryFormatter = jasmine.createSpyObj('telemetryFormatter', [ 'formatDomainValue',