mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 14:22:03 +08:00
Merge pull request #2413 from ONLYOFFICE/fix/bugfix
Disable editing when no support for anonymous users or limit of conne…
This commit is contained in:
@ -730,6 +730,7 @@ define([
|
||||
|
||||
applyLicense: function() {
|
||||
if (!this.appOptions.isAnonymousSupport && !!this.appOptions.user.anonymous) {
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
Common.UI.warning({
|
||||
title: this.notcriticalErrorTitle,
|
||||
@ -752,6 +753,7 @@ define([
|
||||
}
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.canFillForms) {
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
@ -1426,6 +1426,7 @@ define([
|
||||
}
|
||||
} else if (!this.appOptions.isAnonymousSupport && !!this.appOptions.user.anonymous) {
|
||||
this.disableEditing(true);
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
Common.UI.warning({
|
||||
title: this.notcriticalErrorTitle,
|
||||
@ -1450,6 +1451,7 @@ define([
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
|
||||
this.disableEditing(true);
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
@ -513,6 +513,7 @@ class MainController extends Component {
|
||||
} else if (!appOptions.isAnonymousSupport && !!appOptions.config.user.anonymous) {
|
||||
Common.Notifications.trigger('toolbar:activatecontrols');
|
||||
Common.Notifications.trigger('toolbar:deactivateeditcontrols');
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
f7.dialog.create({
|
||||
title: _t.notcriticalErrorTitle,
|
||||
@ -551,6 +552,7 @@ class MainController extends Component {
|
||||
} else {
|
||||
Common.Notifications.trigger('toolbar:activatecontrols');
|
||||
Common.Notifications.trigger('toolbar:deactivateeditcontrols');
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
@ -1043,6 +1043,7 @@ define([
|
||||
}
|
||||
} else if (!this.appOptions.isAnonymousSupport && !!this.appOptions.user.anonymous) {
|
||||
this.disableEditing(true);
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
Common.UI.warning({
|
||||
title: this.notcriticalErrorTitle,
|
||||
@ -1067,6 +1068,7 @@ define([
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
|
||||
this.disableEditing(true);
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
@ -577,6 +577,7 @@ class MainController extends Component {
|
||||
} else if (!appOptions.isAnonymousSupport && !!appOptions.config.user.anonymous) {
|
||||
Common.Notifications.trigger('toolbar:activatecontrols');
|
||||
Common.Notifications.trigger('toolbar:deactivateeditcontrols');
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
f7.dialog.create({
|
||||
title: _t.notcriticalErrorTitle,
|
||||
@ -615,6 +616,7 @@ class MainController extends Component {
|
||||
} else {
|
||||
Common.Notifications.trigger('toolbar:activatecontrols');
|
||||
Common.Notifications.trigger('toolbar:deactivateeditcontrols');
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
@ -1138,6 +1138,7 @@ define([
|
||||
}
|
||||
} else if (!this.appOptions.isAnonymousSupport && !!this.appOptions.user.anonymous) {
|
||||
this.disableEditing(true);
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
Common.UI.warning({
|
||||
title: this.notcriticalErrorTitle,
|
||||
@ -1162,6 +1163,7 @@ define([
|
||||
|
||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
|
||||
this.disableEditing(true);
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
@ -781,6 +781,7 @@ class MainController extends Component {
|
||||
} else if (!appOptions.isAnonymousSupport && !!appOptions.config.user.anonymous) {
|
||||
Common.Notifications.trigger('toolbar:activatecontrols');
|
||||
Common.Notifications.trigger('toolbar:deactivateeditcontrols');
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
f7.dialog.create({
|
||||
title: _t.notcriticalErrorTitle,
|
||||
@ -819,6 +820,7 @@ class MainController extends Component {
|
||||
} else {
|
||||
Common.Notifications.trigger('toolbar:activatecontrols');
|
||||
Common.Notifications.trigger('toolbar:deactivateeditcontrols');
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user