Get edit rights from server config: asc_getRights. Used to set singletone mode

This commit is contained in:
Julia Radzhabova 2016-10-20 10:22:16 +03:00
parent 8dcd118e42
commit 1bcc69da7a
3 changed files with 10 additions and 0 deletions

View file

@ -956,6 +956,10 @@ define([
} }
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review; this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
if (params.asc_getRights() !== Asc.c_oRights.Edit)
this.permissions.edit = this.permissions.review = false;
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success); this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success);
this.appOptions.isLightVersion = params.asc_getIsLight(); this.appOptions.isLightVersion = params.asc_getIsLight();

View file

@ -732,6 +732,9 @@ define([
return; return;
} }
if (params.asc_getRights() !== Asc.c_oRights.Edit)
this.permissions.edit = false;
this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success); this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success);
this.appOptions.isLightVersion = params.asc_getIsLight(); this.appOptions.isLightVersion = params.asc_getIsLight();

View file

@ -752,6 +752,9 @@ define([
return; return;
} }
if (params.asc_getRights() !== Asc.c_oRights.Edit)
this.permissions.edit = false;
this.appOptions.canAutosave = true; this.appOptions.canAutosave = true;
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();