diff --git a/docs/manifest.json b/docs/manifest.json index 0dc88d2e969fe..058d319a6f10f 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -25,7 +25,7 @@ "children": [ { "title": "Postgres", - "description": "Learn how to create and use your own Postgres database.", + "description": "Learn how to create and use your own Postgres database", "path": "./postgres.md" } ] @@ -38,7 +38,7 @@ }, { "title": "Templates", - "description": "Learn about templates, which define the infrastructure underlying workspaces.", + "description": "Learn about templates, which define the infrastructure underlying workspaces", "path": "./templates.md", "icon": " ", "children": [ @@ -57,7 +57,7 @@ }, { "title": "IDEs", - "description": "Learn how to use your IDE of choice with Coder.", + "description": "Learn how to use your IDE of choice with Coder", "path": "./ides.md", "icon": "\n\n\n", "children": [ @@ -74,15 +74,21 @@ "icon": "<\/g><\/g><\/svg>", "path": "./dotfiles.md" }, + { + "title": "User management", + "description": "Learn about user roles available in Coder and how to create and manage users", + "icon": "<\/svg>", + "path": "./users.md" + }, { "title": "Contributing", - "description": "Learn how to contribute to Coder.", + "description": "Learn how to contribute to Coder", "icon": "", "path": "./CONTRIBUTING.md", "children": [ { "title": "Code of Conduct", - "description": "See the code of conduct for contributing to Coder.", + "description": "See the code of conduct for contributing to Coder", "path": "./contributing/CODE_OF_CONDUCT.md" }, { diff --git a/docs/users.md b/docs/users.md new file mode 100644 index 0000000000000..9c7f35fc88b91 --- /dev/null +++ b/docs/users.md @@ -0,0 +1,106 @@ +# User management + +This article walks you through the user roles available in Coder and creating and managing users. + +## User roles + +Coder offers three user roles: + +* **Admin**: Has full access to the Coder system, including all workspaces, users, organizations, and templates +* **Member**: Has limited access to Coder; can create workspaces using the templates and resources they have access to +* **Auditor**: Has the same access rights as a **member**, as well as access to + audit logs + +## Create a user + +To create a user with the web UI: + +1. Log in as an admin. +2. Go to **Users** > **New user**. +3. In the window that opens, provide the **username**, **email**, and + **password** for the user (they can opt to change their password after their + initial login). +4. Click **Submit** to create the user. + +The new user will appear in the **Users** list. Use the toggle to change their +**Roles** if desired. + +To create a user via the Coder CLI, run: + +```console +coder users create +``` + +When prompted, provide the **username** and **email** for the new user. + +You'll receive a response that includes the following; share the instructions +with the user so that they can log into Coder: + +```console +Download the Coder command line for your operating system: +https://github.com/coder/coder/releases + +Run coder login https://.coder.app to authenticate. + +Your email is: email@exampleCo.com +Your password is: + +Create a workspace coder create ! +``` + +## Suspend a user + +Admins can suspend a user, removing the user's access to Coder. + +To suspend a user via the web UI: + +1. Go to **Users**. +2. Find the user you want to suspend, click the vertical ellipsis to the right, + and click **Suspend**. +3. In the confirmation dialog, click **Suspend**. + +To suspend a user via the CLI, run: + +```console +coder users suspend +``` + +Confirm the user suspension by typing **yes** and pressing **enter**. + +## Activate a suspended user + +Admins can activate a suspended user, restoring their access to Coder. + +To activate a user via the web UI: + +1. Go to **Users**. +2. Find the user you want to activate, click the vertical ellipsis to the right, + and click **Activate**. +3. In the confirmation dialog, click **Activate**. + +To activate a user via the CLI, run: + +```console +coder users activate +``` + +Confirm the user activation by typing **yes** and pressing **enter**. + +## Reset a password + +To reset a user's via the web UI: + +1. Go to **Users**. +2. Find the user whose password you want to reset, click the vertical ellipsis to the right, + and select **Reset password**. +3. Coder displays a temporary password that you can send to the user; copy the + password and click **Reset password**. + +Coder will prompt the user to change their temporary password immediately after logging in. + +You can also reset a password via the CLI: + +```console +# run `coder reset-password --help` for usage instructions +coder reset-password +```