[DE PE mobile] Correct app options

This commit is contained in:
SergeyEzhin 2021-06-25 20:36:28 +03:00
parent daa60bdd88
commit 08713dbe99
2 changed files with 4 additions and 0 deletions

View file

@ -86,6 +86,8 @@ export class storeAppOptions {
this.canPlugins = false; this.canPlugins = false;
} }
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) { setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
if (params.asc_getRights() !== Asc.c_oRights.Edit)
permissions.edit = permissions.review = false;
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review; this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
this.canAnalytics = params.asc_getIsAnalyticsEnable(); this.canAnalytics = params.asc_getIsAnalyticsEnable();
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);

View file

@ -64,6 +64,8 @@ export class storeAppOptions {
} }
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) { setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
if (params.asc_getRights() !== Asc.c_oRights.Edit)
permissions.edit = false;
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review; this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
this.canAnalytics = params.asc_getIsAnalyticsEnable(); this.canAnalytics = params.asc_getIsAnalyticsEnable();
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);