diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 27065437a..d3370f7ee 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1013,7 +1013,7 @@ define([ this.appOptions.forcesave = this.appOptions.canForcesave; this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly); this.appOptions.trialMode = params.asc_getLicenseMode(); - this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); + this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); if ( this.appOptions.isLightVersion ) { this.appOptions.canUseHistory = diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 19fa85f47..8dbc5f775 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -280,7 +280,7 @@ define([ } } - if (this.mode.isDesktopApp && this.mode.isOffline) { + if (this.mode.isEdit && this.mode.isDesktopApp && this.mode.isOffline) { // this.$el.find('#fm-btn-back').hide(); this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); this.panels['protect'].setMode(this.mode); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 1db8d850f..8050bdbc8 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -785,7 +785,7 @@ define([ this.appOptions.forcesave = this.appOptions.canForcesave; this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly); this.appOptions.trialMode = params.asc_getLicenseMode(); - this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); + this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 6d88796be..2485c8398 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -277,8 +277,10 @@ define([ if (this.mode.isDesktopApp && this.mode.isOffline) { this.$el.find('#fm-btn-create, #fm-btn-back, #fm-btn-create+.devider').hide(); - this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); - this.panels['protect'].setMode(this.mode); + if (this.mode.isEdit) { + this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); + this.panels['protect'].setMode(this.mode); + } } this.panels['help'].setLangConfig(this.mode.lang); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 1e3b2146a..3efaae235 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -806,7 +806,7 @@ define([ this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canRename = !!this.permissions.rename; this.appOptions.trialMode = params.asc_getLicenseMode(); - this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); + this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); if (this.appOptions.canBranding) diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index b0ab91eff..4e9c51558 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -266,7 +266,7 @@ define([ } } - if (this.mode.isDesktopApp && this.mode.isOffline) { + if (this.mode.isEdit && this.mode.isDesktopApp && this.mode.isOffline) { this.panels['protect'] = (new SSE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); this.panels['protect'].setMode(this.mode); }