mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 12:55:34 +08:00
[DE][PE][SSE] Disable comment, fillForms when no license in the restricted editing mode
This commit is contained in:
@ -1274,7 +1274,7 @@ define([
|
||||
|
||||
onLicenseChanged: function(params) {
|
||||
var licType = params.asc_getLicenseType();
|
||||
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
||||
if (licType !== undefined && (this.appOptions.canEdit || this.appOptions.isRestrictedEdit) && 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 && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||
this._state.licenseType = licType;
|
||||
@ -1300,7 +1300,7 @@ define([
|
||||
primary = 'buynow';
|
||||
}
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.isEdit) {
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
|
||||
this.disableEditing(true);
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
@ -916,7 +916,7 @@ define([
|
||||
|
||||
onLicenseChanged: function(params) {
|
||||
var licType = params.asc_getLicenseType();
|
||||
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
||||
if (licType !== undefined && (this.appOptions.canEdit || this.appOptions.isRestrictedEdit) && 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 && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||
this._state.licenseType = licType;
|
||||
@ -942,7 +942,7 @@ define([
|
||||
primary = 'buynow';
|
||||
}
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.isEdit) {
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
|
||||
this.disableEditing(true);
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
@ -1017,7 +1017,7 @@ define([
|
||||
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;
|
||||
|
||||
var licType = params.asc_getLicenseType();
|
||||
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
||||
if (licType !== undefined && (this.appOptions.canEdit || this.appOptions.isRestrictedEdit) && 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 && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||
this._state.licenseType = licType;
|
||||
@ -1043,7 +1043,7 @@ define([
|
||||
primary = 'buynow';
|
||||
}
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.isEdit) {
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
|
||||
this.disableEditing(true);
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user