diff --git a/src/command-line/index.js b/src/command-line/index.js index 20d7273b..2fe21d1a 100644 --- a/src/command-line/index.js +++ b/src/command-line/index.js @@ -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 diff --git a/src/command-line/users/add.js b/src/command-line/users/add.js index d50766cb..21148557 100644 --- a/src/command-line/users/add.js +++ b/src/command-line/users/add.js @@ -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(); diff --git a/src/command-line/users/edit.js b/src/command-line/users/edit.js index 56df03a4..cafc91e9 100644 --- a/src/command-line/users/edit.js +++ b/src/command-line/users/edit.js @@ -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; diff --git a/src/command-line/users/list.js b/src/command-line/users/list.js index bce6cd08..64fdf063 100644 --- a/src/command-line/users/list.js +++ b/src/command-line/users/list.js @@ -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; diff --git a/src/command-line/users/reset.js b/src/command-line/users/reset.js index bcc4038b..a3e47fbe 100644 --- a/src/command-line/users/reset.js +++ b/src/command-line/users/reset.js @@ -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;