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("./config");
|
||||
require("./users");
|
||||
if (!Helper.config.public && !Helper.config.ldap.enable) {
|
||||
require("./users");
|
||||
}
|
||||
require("./install");
|
||||
|
||||
// TODO: Remove this when releasing The Lounge v3
|
||||
|
@ -17,11 +17,6 @@ program
|
||||
}
|
||||
|
||||
const ClientManager = require("../../clientManager");
|
||||
|
||||
if (Helper.config.public) {
|
||||
log.warn(`Users have no effect in ${colors.bold("public")} mode.`);
|
||||
}
|
||||
|
||||
const manager = new ClientManager();
|
||||
const users = manager.getUsers();
|
||||
|
||||
|
@ -18,8 +18,7 @@ program
|
||||
}
|
||||
|
||||
const ClientManager = require("../../clientManager");
|
||||
|
||||
var users = new ClientManager().getUsers();
|
||||
const users = new ClientManager().getUsers();
|
||||
|
||||
if (users === undefined) { // There was an error, already logged
|
||||
return;
|
||||
|
@ -17,12 +17,7 @@ program
|
||||
}
|
||||
|
||||
const ClientManager = require("../../clientManager");
|
||||
|
||||
if (Helper.config.public) {
|
||||
log.warn(`Users have no effect in ${colors.bold("public")} mode.`);
|
||||
}
|
||||
|
||||
var users = new ClientManager().getUsers();
|
||||
const users = new ClientManager().getUsers();
|
||||
|
||||
if (users === undefined) { // There was an error, already logged
|
||||
return;
|
||||
|
@ -17,8 +17,7 @@ program
|
||||
}
|
||||
|
||||
const ClientManager = require("../../clientManager");
|
||||
|
||||
var users = new ClientManager().getUsers();
|
||||
const users = new ClientManager().getUsers();
|
||||
|
||||
if (users === undefined) { // There was an error, already logged
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user