diff --git a/frontend/src/pages/OnboardingFlow/Steps/UserSetup/index.jsx b/frontend/src/pages/OnboardingFlow/Steps/UserSetup/index.jsx index 7e938076af51a6d18c000311218093a60d99eae6..04625abf49395562c2469ad3d22513737f042998 100644 --- a/frontend/src/pages/OnboardingFlow/Steps/UserSetup/index.jsx +++ b/frontend/src/pages/OnboardingFlow/Steps/UserSetup/index.jsx @@ -288,6 +288,11 @@ const MyTeam = ({ setMultiUserLoginValid, myTeamSubmitRef, navigate }) => { onChange={handleUsernameChange} /> </div> + <p className=" text-white text-opacity-80 text-xs font-base"> + Username must be at least 6 characters long and only contain + lowercase letters, numbers, underscores, and hyphens with no + spaces. + </p> <div className="mt-4"> <label htmlFor="name" @@ -306,9 +311,8 @@ const MyTeam = ({ setMultiUserLoginValid, myTeamSubmitRef, navigate }) => { onChange={handlePasswordChange} /> </div> - <p className="w-96 text-white text-opacity-80 text-xs font-base"> - Username must be at least 6 characters long. Password must be at - least 8 characters long. + <p className=" text-white text-opacity-80 text-xs font-base"> + Password must be at least 8 characters long. </p> </div> </div> diff --git a/server/endpoints/system.js b/server/endpoints/system.js index 2b5e5c01b105d9c2da94f8443485b6194cb9205c..d49765d4033f81202904d1131ad4645a6b730316 100644 --- a/server/endpoints/system.js +++ b/server/endpoints/system.js @@ -481,6 +481,15 @@ function systemEndpoints(app) { password, role: ROLES.admin, }); + + if (error || !user) { + response.status(400).json({ + success: false, + error: error || "Failed to enable multi-user mode.", + }); + return; + } + await SystemSettings._updateSettings({ multi_user_mode: true, limit_user_messages: false,