From 67745e22b101f2709ac7eee6969b31cd84c02bd2 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 24 Nov 2020 14:54:41 +0300 Subject: [PATCH] Fix Bug 47637 --- apps/documenteditor/main/app/controller/Main.js | 6 ++++-- apps/documenteditor/mobile/app/controller/Main.js | 6 ++++-- apps/presentationeditor/main/app/controller/Main.js | 4 +++- apps/presentationeditor/mobile/app/controller/Main.js | 4 +++- apps/spreadsheeteditor/main/app/controller/Main.js | 4 +++- apps/spreadsheeteditor/mobile/app/controller/Main.js | 4 +++- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 3ef6e03bc..3cee4a7f5 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1119,7 +1119,7 @@ define([ var licType = params.asc_getLicenseType(); if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.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 || licType===Asc.c_oLicenseResult.ExpiredLimited) && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; if (this._isDocReady) @@ -1199,6 +1199,8 @@ define([ }); return; } + if (Asc.c_oLicenseResult.ExpiredLimited === licType) + this._state.licenseType = licType; if ( this.onServerVersion(params.asc_getBuildVersion()) ) return; @@ -1245,7 +1247,7 @@ define([ this.appOptions.canProtect = (this.appOptions.isSignatureSupport || this.appOptions.isPasswordSupport); this.appOptions.canEditContentControl = (this.permissions.modifyContentControl!==false); this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); - this.appOptions.canFillForms = ((this.permissions.fillForms===undefined) ? this.appOptions.isEdit : this.permissions.fillForms) && (this.editorConfig.mode !== 'view'); + this.appOptions.canFillForms = this.appOptions.canLicense && ((this.permissions.fillForms===undefined) ? this.appOptions.isEdit : this.permissions.fillForms) && (this.editorConfig.mode !== 'view'); this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && (this.appOptions.canComments || this.appOptions.canFillForms); if (this.appOptions.isRestrictedEdit && this.appOptions.canComments && this.appOptions.canFillForms) // must be one restricted mode, priority for filling forms this.appOptions.canComments = false; diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 4657f1289..b3aaef1f3 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -659,7 +659,7 @@ define([ var licType = params.asc_getLicenseType(); if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.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 || licType===Asc.c_oLicenseResult.ExpiredLimited) && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; if (this._isDocReady && this._state.licenseType) @@ -768,6 +768,8 @@ define([ }); return; } + if (Asc.c_oLicenseResult.ExpiredLimited === licType) + me._state.licenseType = licType; if ( me.onServerVersion(params.asc_getBuildVersion()) ) return; @@ -799,7 +801,7 @@ define([ me.appOptions.canEditStyles = me.appOptions.canLicense && me.appOptions.canEdit; me.appOptions.canPrint = (me.permissions.print !== false); me.appOptions.fileKey = me.document.key; - me.appOptions.canFillForms = ((me.permissions.fillForms===undefined) ? me.appOptions.isEdit : me.permissions.fillForms) && (me.editorConfig.mode !== 'view'); + me.appOptions.canFillForms = me.appOptions.canLicense && ((me.permissions.fillForms===undefined) ? me.appOptions.isEdit : me.permissions.fillForms) && (me.editorConfig.mode !== 'view'); me.appOptions.isRestrictedEdit = !me.appOptions.isEdit && me.appOptions.canFillForms; me.appOptions.trialMode = params.asc_getLicenseMode(); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index ce203c375..5343a425c 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -845,7 +845,7 @@ define([ var licType = params.asc_getLicenseType(); if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.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 || licType===Asc.c_oLicenseResult.ExpiredLimited) && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; if (this._isDocReady) @@ -934,6 +934,8 @@ define([ }); return; } + if (Asc.c_oLicenseResult.ExpiredLimited === licType) + this._state.licenseType = licType; if ( this.onServerVersion(params.asc_getBuildVersion()) ) return; diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 0206def08..30897f8f9 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -589,7 +589,7 @@ define([ var licType = params.asc_getLicenseType(); if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.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 || licType===Asc.c_oLicenseResult.ExpiredLimited) && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; if (this._isDocReady && this._state.licenseType) @@ -698,6 +698,8 @@ define([ }); return; } + if (Asc.c_oLicenseResult.ExpiredLimited === licType) + me._state.licenseType = licType; if ( me.onServerVersion(params.asc_getBuildVersion()) ) return; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 18f315960..bb5fa006a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -912,7 +912,7 @@ define([ var licType = params.asc_getLicenseType(); if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.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 || licType===Asc.c_oLicenseResult.ExpiredLimited) && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; if (this._isDocReady) @@ -1001,6 +1001,8 @@ define([ }); return; } + if (Asc.c_oLicenseResult.ExpiredLimited === licType) + this._state.licenseType = licType; if ( this.onServerVersion(params.asc_getBuildVersion()) ) return; diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 690167f16..f2c17bcc2 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -615,7 +615,7 @@ define([ var licType = params.asc_getLicenseType(); if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.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 || licType===Asc.c_oLicenseResult.ExpiredLimited) && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) + || licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0)) this._state.licenseType = licType; if (this._isDocReady && this._state.licenseType) @@ -724,6 +724,8 @@ define([ }); return; } + if (Asc.c_oLicenseResult.ExpiredLimited === licType) + me._state.licenseType = licType; if ( me.onServerVersion(params.asc_getBuildVersion()) ) return;