From 96efeeb77b3448feadec8f094bff2461a1eb7e9a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 17 Jan 2022 19:03:25 +0300 Subject: [PATCH] [Mobile] Show warning and disable editing for fill forms and commenting when no license (Bug 54910) --- apps/documenteditor/mobile/src/controller/Main.jsx | 2 +- apps/presentationeditor/mobile/src/controller/Main.jsx | 2 +- apps/spreadsheeteditor/mobile/src/controller/Main.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index c6c253a30..8ececa86f 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -405,7 +405,7 @@ class MainController extends Component { onLicenseChanged (params) { const appOptions = this.props.storeAppOptions; const licType = params.asc_getLicenseType(); - if (licType !== undefined && appOptions.canEdit && appOptions.config.mode !== 'view' && + if (licType !== undefined && (appOptions.canEdit || appOptions.isRestrictedEdit) && appOptions.config.mode !== 'view' && (licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS || licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 1c2d676f9..1dc80e1c9 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -484,7 +484,7 @@ class MainController extends Component { onLicenseChanged (params) { const appOptions = this.props.storeAppOptions; const licType = params.asc_getLicenseType(); - if (licType !== undefined && appOptions.canEdit && appOptions.config.mode !== 'view' && + if (licType !== undefined && (appOptions.canEdit || appOptions.isRestrictedEdit) && appOptions.config.mode !== 'view' && (licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS || licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index 56df7d9c4..0147c2116 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -565,7 +565,7 @@ class MainController extends Component { if (appOptions.isEditDiagram || appOptions.isEditMailMerge) return; const licType = params.asc_getLicenseType(); - if (licType !== undefined && appOptions.canEdit && appOptions.config.mode !== 'view' && + if (licType !== undefined && (appOptions.canEdit || appOptions.isRestrictedEdit) && appOptions.config.mode !== 'view' && (licType === Asc.c_oLicenseResult.Connections || licType === Asc.c_oLicenseResult.UsersCount || licType === Asc.c_oLicenseResult.ConnectionsOS || licType === Asc.c_oLicenseResult.UsersCountOS || licType === Asc.c_oLicenseResult.SuccessLimit && (appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType;