diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index e3de713aa..af24a55f2 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -55,7 +55,8 @@ view: ["Group1", ""] // current user can view comments made by users from Group1 and users without a group. edit: ["Group1", ""] // current user can edit comments made by users from Group1 and users without a group. remove: ["Group1", ""] // current user can remove comments made by users from Group1 and users without a group. - } + }, + protect: // default = true. show/hide protect tab or protect buttons } }, editorConfig: { diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 0861e0dd2..9d91fbfa7 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1410,8 +1410,8 @@ define([ this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.isBeta = params.asc_getIsBeta(); - this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport(); - this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport(); + this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport() && (this.permissions.protect!==false); + this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false); this.appOptions.canProtect = (this.appOptions.isSignatureSupport || this.appOptions.isPasswordSupport); this.appOptions.canEditContentControl = (this.permissions.modifyContentControl!==false); this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 320fb5f37..270dc6da5 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1111,8 +1111,8 @@ define([ this.appOptions.buildVersion = params.asc_getBuildVersion(); this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.isBeta = params.asc_getIsBeta(); - this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport(); - this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport(); + this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport() && (this.permissions.protect!==false); + this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false); this.appOptions.canProtect = (this.appOptions.isSignatureSupport || this.appOptions.isPasswordSupport); this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 9764b6f26..9035a5194 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1241,8 +1241,10 @@ define([ if (this.permissions.editCommentAuthorOnly===undefined && this.permissions.deleteCommentAuthorOnly===undefined) this.appOptions.canEditComments = this.appOptions.canDeleteComments = this.appOptions.isOffline; } - this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport() && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); - this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); + this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport() && (this.permissions.protect!==false) + && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); + this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false) + && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); this.appOptions.canProtect = (this.appOptions.isSignatureSupport || this.appOptions.isPasswordSupport); this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments;