diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 5bfb2ff10..0aafc7a84 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1131,7 +1131,8 @@ define([ var license = this._state.licenseType, buttons = ['ok'], primary = 'ok'; - if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0) { + if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 && + (license===Asc.c_oLicenseResult.SuccessLimit || license===Asc.c_oLicenseResult.ExpiredLimited || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) { (license===Asc.c_oLicenseResult.ExpiredLimited) && this.getApplication().getController('LeftMenu').leftMenu.setLimitMode();// show limited hint license = (license===Asc.c_oLicenseResult.ExpiredLimited) ? this.warnLicenseLimitedNoAccess : this.warnLicenseLimitedRenewed; } else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) { @@ -1209,6 +1210,7 @@ define([ if (params.asc_getRights() !== Asc.c_oRights.Edit) this.permissions.edit = this.permissions.review = false; + this.appOptions.permissionsLicense = licType; this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); this.appOptions.isLightVersion = params.asc_getIsLight(); diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index b3aaef1f3..51cb46f04 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -687,7 +687,8 @@ define([ if (this._state.licenseType) { var license = this._state.licenseType, buttons = [{text: 'OK'}]; - if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0) { + if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 && + (license===Asc.c_oLicenseResult.SuccessLimit || license===Asc.c_oLicenseResult.ExpiredLimited || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) { license = (license===Asc.c_oLicenseResult.ExpiredLimited) ? this.warnLicenseLimitedNoAccess : this.warnLicenseLimitedRenewed; } else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) { license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded; @@ -773,6 +774,7 @@ define([ if ( me.onServerVersion(params.asc_getBuildVersion()) ) return; + me.appOptions.permissionsLicense = licType; me.permissions.review = (me.permissions.review === undefined) ? (me.permissions.edit !== false) : me.permissions.review; me.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); me.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 85f26076c..d8c228a71 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -857,7 +857,8 @@ define([ var license = this._state.licenseType, buttons = ['ok'], primary = 'ok'; - if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0) { + if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 && + (license===Asc.c_oLicenseResult.SuccessLimit || license===Asc.c_oLicenseResult.ExpiredLimited || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) { (license===Asc.c_oLicenseResult.ExpiredLimited) && this.getApplication().getController('LeftMenu').leftMenu.setLimitMode();// show limited hint license = (license===Asc.c_oLicenseResult.ExpiredLimited) ? this.warnLicenseLimitedNoAccess : this.warnLicenseLimitedRenewed; } else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) { @@ -942,6 +943,7 @@ define([ if (params.asc_getRights() !== Asc.c_oRights.Edit) this.permissions.edit = false; + this.appOptions.permissionsLicense = licType; this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.isCrypted = this.api.asc_isCrypto(); this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 30897f8f9..54dd18f5c 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -617,7 +617,8 @@ define([ if (this._state.licenseType) { var license = this._state.licenseType, buttons = [{text: 'OK'}]; - if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0) { + if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 && + (license===Asc.c_oLicenseResult.SuccessLimit || license===Asc.c_oLicenseResult.ExpiredLimited || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) { license = (license===Asc.c_oLicenseResult.ExpiredLimited) ? this.warnLicenseLimitedNoAccess : this.warnLicenseLimitedRenewed; } else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) { license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded; @@ -703,6 +704,7 @@ define([ if ( me.onServerVersion(params.asc_getBuildVersion()) ) return; + me.appOptions.permissionsLicense = licType; me.permissions.review = (me.permissions.review === undefined) ? (me.permissions.edit !== false) : me.permissions.review; me.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); me.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 467d412af..860646e1e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -924,7 +924,8 @@ define([ var license = this._state.licenseType, buttons = ['ok'], primary = 'ok'; - if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0) { + if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 && + (license===Asc.c_oLicenseResult.SuccessLimit || license===Asc.c_oLicenseResult.ExpiredLimited || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) { (license===Asc.c_oLicenseResult.ExpiredLimited) && this.getApplication().getController('LeftMenu').leftMenu.setLimitMode();// show limited hint license = (license===Asc.c_oLicenseResult.ExpiredLimited) ? this.warnLicenseLimitedNoAccess : this.warnLicenseLimitedRenewed; } else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) { @@ -1009,6 +1010,7 @@ define([ if (params.asc_getRights() !== Asc.c_oRights.Edit) this.permissions.edit = false; + this.appOptions.permissionsLicense = licType; this.appOptions.canAutosave = true; this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index f2c17bcc2..d57e09c86 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -642,7 +642,8 @@ define([ if (this._state.licenseType) { var license = this._state.licenseType, buttons = [{text: 'OK'}]; - if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0) { + if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 && + (license===Asc.c_oLicenseResult.SuccessLimit || license===Asc.c_oLicenseResult.ExpiredLimited || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) { license = (license===Asc.c_oLicenseResult.ExpiredLimited) ? this.warnLicenseLimitedNoAccess : this.warnLicenseLimitedRenewed; } else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) { license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded; @@ -733,6 +734,7 @@ define([ me.permissions.edit = false; } + me.appOptions.permissionsLicense = licType; me.appOptions.canAutosave = true; me.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();