[DE] Fix Bug 41546

This commit is contained in:
Julia Radzhabova 2022-02-01 20:04:34 +03:00
parent 6c88c1c30d
commit c79aa4507e

View file

@ -1381,6 +1381,8 @@ define([
if ( this.onServerVersion(params.asc_getBuildVersion()) || !this.onLanguageLoaded()) return;
var isPDFViewer = /^(?:(pdf|djvu|xps|oxps))$/.test(this.document.fileType);
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
if (params.asc_getRights() !== Asc.c_oRights.Edit)
@ -1409,8 +1411,8 @@ define([
this.appOptions.canUseMailMerge= this.appOptions.canLicense && this.appOptions.canEdit && !this.appOptions.isOffline;
this.appOptions.canSendEmailAddresses = this.appOptions.canLicense && this.editorConfig.canSendEmailAddresses && this.appOptions.canEdit && this.appOptions.canCoAuthoring;
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comment===undefined ? this.appOptions.isEdit : this.permissions.comment) && (this.editorConfig.mode !== 'view');
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canViewComments = this.appOptions.canComments || !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canComments = !isPDFViewer && this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canViewComments = this.appOptions.canComments || !isPDFViewer && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !(this.permissions.chat===false || (this.permissions.chat===undefined) &&
(typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
if ((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat!==undefined) {
@ -1464,7 +1466,7 @@ define([
var type = /^(?:(djvu))$/.exec(this.document.fileType);
this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
this.appOptions.canUseSelectHandTools = this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = /^(?:(pdf|djvu|xps|oxps))$/.test(this.document.fileType);
this.appOptions.canUseSelectHandTools = this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = isPDFViewer;
this.appOptions.canDownloadForms = this.appOptions.canLicense && this.appOptions.canDownload;
this.appOptions.fileKey = this.document.key;