mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 16:32:11 +08:00
Merge pull request #2538 from ONLYOFFICE/feature/forceedit
[DE mobile] Added checking force edit mode
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user