permissions.comments -> permissions.comment.

This commit is contained in:
Julia Radzhabova 2017-06-28 18:34:16 +03:00
parent 65a8ea06fb
commit 93e4a6a927
4 changed files with 4 additions and 3 deletions

View file

@ -43,6 +43,7 @@
print: <can print>, // default = true
rename: <can rename>, // default = false
changeHistory: <can change history>, // default = false
comment: <can comment in view mode> // default = edit
}
},
editorConfig: {

View file

@ -980,7 +980,7 @@ define([
this.appOptions.canHistoryRestore= this.editorConfig.canHistoryRestore && !!this.permissions.changeHistory;
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.comments===undefined ? this.appOptions.isEdit : this.permissions.comments);
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comment===undefined ? this.appOptions.isEdit : this.permissions.comment);
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;

View file

@ -767,7 +767,7 @@ define([
this.appOptions.isEdit = this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download !== false;
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comments===undefined ? this.appOptions.isEdit : this.permissions.comments);
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comment===undefined ? this.appOptions.isEdit : this.permissions.comment);
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
this.appOptions.canPrint = (this.permissions.print !== false);

View file

@ -792,7 +792,7 @@ define([
/** coauthoring begin **/
this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion;
/** coauthoring end **/
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comments===undefined ? (this.permissions.edit !== false && this.editorConfig.mode !== 'view') : this.permissions.comments);
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comment===undefined ? (this.permissions.edit !== false && this.editorConfig.mode !== 'view') : this.permissions.comment);
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
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;