fix bug 32580

This commit is contained in:
Julia Radzhabova 2016-06-16 16:09:26 +03:00
parent 1c46c17a3d
commit c725feb667
6 changed files with 6 additions and 3 deletions
apps
documenteditor/main/app
controller
view
presentationeditor/main/app
controller
view
spreadsheeteditor/main/app
controller
view

View file

@ -932,6 +932,7 @@ define([
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.isReviewOnly = (this.permissions.review === true) && (this.permissions.edit === false);
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
this.appOptions.canEdit = (this.permissions.edit !== false || this.permissions.review === true) && // can edit or review
(this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view') && // if mode=="view" -> canRequestEditRights must be defined
(!this.appOptions.isReviewOnly || this.appOptions.canLicense); // if isReviewOnly==true -> canLicense must be true

View file

@ -217,7 +217,7 @@ define([
// this.hkSaveAs[this.mode.canDownload?'enable':'disable']();
this.items[1][this.mode.isEdit?'show':'hide']();
this.items[2][!this.mode.isEdit&&this.mode.canEdit?'show':'hide']();
this.items[2][!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
this.items[9][(!this.mode.isOffline && !this.mode.isReviewOnly && this.document&&this.document.info &&
(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||

View file

@ -712,6 +712,7 @@ define([
/** coauthoring end **/
this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
this.appOptions.canEdit = this.permissions.edit !== false && // can edit
(this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view'); // if mode=="view" -> canRequestEditRights must be defined
this.appOptions.isEdit = this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';

View file

@ -215,7 +215,7 @@ define([
// this.hkSaveAs[this.mode.canDownload?'enable':'disable']();
this.items[1][this.mode.isEdit?'show':'hide']();
this.items[2][!this.mode.isEdit&&this.mode.canEdit?'show':'hide']();
this.items[2][!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
this.items[9][(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();

View file

@ -736,6 +736,7 @@ define([
}
}
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
this.appOptions.canEdit = this.permissions.edit !== false && // can edit
(this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view'); // if mode=="view" -> canRequestEditRights must be defined
this.appOptions.isEdit = (this.appOptions.canLicense || this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) && this.permissions.edit !== false && this.editorConfig.mode !== 'view';

View file

@ -200,7 +200,7 @@ define([
// this.hkSaveAs[this.mode.canDownload?'enable':'disable']();
this.items[1][this.mode.isEdit?'show':'hide']();
this.items[2][!this.mode.isEdit&&this.mode.canEdit?'show':'hide']();
this.items[2][!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
this.items[9][(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();