Do not load user commands or display them on --help
if public mode or using LDAP
This commit is contained in:
parent
c038935b96
commit
c21aee3d4a
@ -51,7 +51,9 @@ Helper.setHome(home);
|
|||||||
|
|
||||||
require("./start");
|
require("./start");
|
||||||
require("./config");
|
require("./config");
|
||||||
require("./users");
|
if (!Helper.config.public && !Helper.config.ldap.enable) {
|
||||||
|
require("./users");
|
||||||
|
}
|
||||||
require("./install");
|
require("./install");
|
||||||
|
|
||||||
// TODO: Remove this when releasing The Lounge v3
|
// TODO: Remove this when releasing The Lounge v3
|
||||||
|
@ -17,11 +17,6 @@ program
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ClientManager = require("../../clientManager");
|
const ClientManager = require("../../clientManager");
|
||||||
|
|
||||||
if (Helper.config.public) {
|
|
||||||
log.warn(`Users have no effect in ${colors.bold("public")} mode.`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const manager = new ClientManager();
|
const manager = new ClientManager();
|
||||||
const users = manager.getUsers();
|
const users = manager.getUsers();
|
||||||
|
|
||||||
|
@ -18,8 +18,7 @@ program
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ClientManager = require("../../clientManager");
|
const ClientManager = require("../../clientManager");
|
||||||
|
const users = new ClientManager().getUsers();
|
||||||
var users = new ClientManager().getUsers();
|
|
||||||
|
|
||||||
if (users === undefined) { // There was an error, already logged
|
if (users === undefined) { // There was an error, already logged
|
||||||
return;
|
return;
|
||||||
|
@ -17,12 +17,7 @@ program
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ClientManager = require("../../clientManager");
|
const ClientManager = require("../../clientManager");
|
||||||
|
const users = new ClientManager().getUsers();
|
||||||
if (Helper.config.public) {
|
|
||||||
log.warn(`Users have no effect in ${colors.bold("public")} mode.`);
|
|
||||||
}
|
|
||||||
|
|
||||||
var users = new ClientManager().getUsers();
|
|
||||||
|
|
||||||
if (users === undefined) { // There was an error, already logged
|
if (users === undefined) { // There was an error, already logged
|
||||||
return;
|
return;
|
||||||
|
@ -17,8 +17,7 @@ program
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ClientManager = require("../../clientManager");
|
const ClientManager = require("../../clientManager");
|
||||||
|
const users = new ClientManager().getUsers();
|
||||||
var users = new ClientManager().getUsers();
|
|
||||||
|
|
||||||
if (users === undefined) { // There was an error, already logged
|
if (users === undefined) { // There was an error, already logged
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user