Merge pull request #1168 from ONLYOFFICE/fix/bug-50962
Fix Bug 50962: add parameter to config: permissions->protect // show/…
This commit is contained in:
commit
ea3357c6bf
|
@ -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: <can protect document> // default = true. show/hide protect tab or protect buttons
|
||||
}
|
||||
},
|
||||
editorConfig: {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue