feat: add "Full Name" field to user creation (#13659)

Adds the ability to specify "Full Name" (a.k.a. Name) when
creating users either via CLI or UI.
This commit is contained in:
Cian Johnston
2024-06-26 09:00:42 +01:00
committed by GitHub
parent 87ad560aff
commit 8a3592582b
33 changed files with 435 additions and 25 deletions
+2 -2
View File
@@ -155,7 +155,7 @@ fatal() {
if [ ! -f "${PROJECT_ROOT}/.coderv2/developsh-did-first-setup" ]; then
# Try to create the initial admin user.
if "${CODER_DEV_SHIM}" login http://127.0.0.1:3000 --first-user-username=admin --first-user-email=admin@coder.com --first-user-password="${password}" --first-user-trial=true; then
if "${CODER_DEV_SHIM}" login http://127.0.0.1:3000 --first-user-username=admin --first-user-email=admin@coder.com --first-user-password="${password}" --first-user-full-name="Admin User" --first-user-trial=true; then
# Only create this file if an admin user was successfully
# created, otherwise we won't retry on a later attempt.
touch "${PROJECT_ROOT}/.coderv2/developsh-did-first-setup"
@@ -164,7 +164,7 @@ fatal() {
fi
# Try to create a regular user.
"${CODER_DEV_SHIM}" users create --email=member@coder.com --username=member --password="${password}" ||
"${CODER_DEV_SHIM}" users create --email=member@coder.com --username=member --full-name "Regular User" --password="${password}" ||
echo 'Failed to create regular user. To troubleshoot, try running this command manually.'
fi