bugfix whipe board with new role function.

This commit is contained in:
Entwicklung 2022-10-03 18:33:07 +02:00
parent f88edba08d
commit f45aabc4b9

View file

@ -30,7 +30,7 @@ var fs = require("./fs_promises.js"),
path = require("path"),
config = require("./configuration.js"),
Mutex = require("async-mutex").Mutex,
jwtauth = require("./jwtauth.js");
jwtauth = require("./jwtBoardnameAuth.js");
/**
* Represents a board.
@ -174,7 +174,7 @@ class BoardData {
this.addChild(message.parent, message);
break;
case "clear":
if(jwtauth.checkIfModerator(message.token)) {
if(jwtauth.roleInBoard(message.token,message.board)) {
this.clear();
} else {
throw new Error("User is not a moderator");