mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Updated to show locked-modal instead signin-modal when permission is "locked"
This commit is contained in:
parent
21ad5cfd60
commit
02cd3d633e
1 changed files with 8 additions and 1 deletions
|
@ -1722,7 +1722,14 @@ editor.on('beforeChange', function (cm, change) {
|
||||||
if (!isIgnoreEmitEvent) {
|
if (!isIgnoreEmitEvent) {
|
||||||
if (!havePermission()) {
|
if (!havePermission()) {
|
||||||
change.canceled = true;
|
change.canceled = true;
|
||||||
$('.signin-modal').modal('show');
|
switch (permission) {
|
||||||
|
case "editable":
|
||||||
|
$('.signin-modal').modal('show');
|
||||||
|
break;
|
||||||
|
case "locked":
|
||||||
|
$('.locked-modal').modal('show');
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (change.origin == 'ignoreHistory') {
|
if (change.origin == 'ignoreHistory') {
|
||||||
|
|
Loading…
Reference in a new issue