From 3adba9a0ae9fa8002c772de3eb6e947ab5ea2ed5 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 24 Aug 2023 13:16:34 +0300 Subject: [PATCH] [DE mobile] Added checking force edit mode --- apps/documenteditor/mobile/src/controller/Main.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 6edd5e155b..583f4ab361 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -214,6 +214,8 @@ class MainController extends Component { this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); const storeAppOptions = this.props.storeAppOptions; + const editorConfig = window.native?.editorConfig; + const isForceEdit = editorConfig?.forceedit; storeAppOptions.setPermissionOptions(this.document, licType, params, this.permissions, EditorUIController.isSupportEditFeature()); @@ -223,8 +225,10 @@ class MainController extends Component { const dataDoc = storeDocumentInfo.dataDoc; const isExtRestriction = dataDoc.fileType !== 'oform'; - if(isExtRestriction) { + if(isExtRestriction && !isForceEdit) { this.api.asc_addRestriction(Asc.c_oAscRestrictionType.View); + } else if(isExtRestriction && isForceEdit) { + storeAppOptions.changeViewerMode(false); } else { this.api.asc_addRestriction(Asc.c_oAscRestrictionType.OnlyForms) }