Skip to content

Commit 34222b2

Browse files
author
Katie Horne
authored
chore: add doc on roles, user management (#2548)
1 parent 1778db2 commit 34222b2

File tree

2 files changed

+117
-5
lines changed

2 files changed

+117
-5
lines changed

docs/manifest.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"children": [
2626
{
2727
"title": "Postgres",
28-
"description": "Learn how to create and use your own Postgres database.",
28+
"description": "Learn how to create and use your own Postgres database",
2929
"path": "./postgres.md"
3030
}
3131
]
@@ -38,7 +38,7 @@
3838
},
3939
{
4040
"title": "Templates",
41-
"description": "Learn about templates, which define the infrastructure underlying workspaces.",
41+
"description": "Learn about templates, which define the infrastructure underlying workspaces",
4242
"path": "./templates.md",
4343
"icon": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M15.0017 4.0017H1.0017C0.868289 3.99368 0.734692 4.01405 0.609732 4.06147C0.484772 4.10889 0.371292 4.18228 0.276784 4.27678C0.182276 4.37129 0.108891 4.48477 0.0614728 4.60973C0.0140548 4.73469 -0.00631686 4.86829 0.00170278 5.0017V15.0017C-0.00631686 15.1351 0.0140548 15.2687 0.0614728 15.3937C0.108891 15.5186 0.182276 15.6321 0.276784 15.7266C0.371292 15.8211 0.484772 15.8945 0.609732 15.9419C0.734692 15.9894 0.868289 16.0097 1.0017 16.0017H15.0017C15.1351 16.0097 15.2687 15.9894 15.3937 15.9419C15.5186 15.8945 15.6321 15.8211 15.7266 15.7266C15.8211 15.6321 15.8945 15.5186 15.9419 15.3937C15.9894 15.2687 16.0097 15.1351 16.0017 15.0017V5.0017C16.0097 4.86829 15.9894 4.73469 15.9419 4.60973C15.8945 4.48477 15.8211 4.37129 15.7266 4.27678C15.6321 4.18228 15.5186 4.10889 15.3937 4.06147C15.2687 4.01405 15.1351 3.99368 15.0017 4.0017ZM14.0017 14.0017H2.0017V6.0017H14.0017V14.0017Z\" /> <path d=\"M14 0H2V2H14V0Z\" fill=\"#333333\"/> <path d=\"M5 13L10 8L13 13H5Z\" /> <path d=\"M5 10C5.55228 10 6 9.55228 6 9C6 8.44772 5.55228 8 5 8C4.44772 8 4 8.44772 4 9C4 9.55228 4.44772 10 5 10Z\" /> </svg>",
4444
"children": [
@@ -57,7 +57,7 @@
5757
},
5858
{
5959
"title": "IDEs",
60-
"description": "Learn how to use your IDE of choice with Coder.",
60+
"description": "Learn how to use your IDE of choice with Coder",
6161
"path": "./ides.md",
6262
"icon": "<svg viewBox=\"0 0 512 466\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M46.5 0.837754C20.5 0.837754 0 22.3052 0 49.5321V122.94V196.348V221.062V245.776V270.489V343.898V417.306C0 444.533 20.5 466 46.5 466H256H465.5C491.5 466 512 444.533 512 417.306V343.898V244.205V195.511V122.102V48.6944C512 21.4674 491.5 0 465.5 0H256H46.5V0.837754Z\" />\n<path d=\"M70.1 73.1V99.1L140.2 140.1L70.1 181.1V207.1L186.7 140.1L70.1 73.1ZM185.9 186.5V210.1H302.5V186.5H185.9Z\" fill=\"white\" />\n</svg>",
6363
"children": [
@@ -74,15 +74,21 @@
7474
"icon": "<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" enable-background=\"new 0 0 24 24\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><g><rect fill=\"none\" height=\"24\" width=\"24\"\/><\/g><g><path d=\"M12,2C6.49,2,2,6.49,2,12s4.49,10,10,10c1.38,0,2.5-1.12,2.5-2.5c0-0.61-0.23-1.2-0.64-1.67c-0.08-0.1-0.13-0.21-0.13-0.33 c0-0.28,0.22-0.5,0.5-0.5H16c3.31,0,6-2.69,6-6C22,6.04,17.51,2,12,2z M17.5,13c-0.83,0-1.5-0.67-1.5-1.5c0-0.83,0.67-1.5,1.5-1.5 s1.5,0.67,1.5,1.5C19,12.33,18.33,13,17.5,13z M14.5,9C13.67,9,13,8.33,13,7.5C13,6.67,13.67,6,14.5,6S16,6.67,16,7.5 C16,8.33,15.33,9,14.5,9z M5,11.5C5,10.67,5.67,10,6.5,10S8,10.67,8,11.5C8,12.33,7.33,13,6.5,13S5,12.33,5,11.5z M11,7.5 C11,8.33,10.33,9,9.5,9S8,8.33,8,7.5C8,6.67,8.67,6,9.5,6S11,6.67,11,7.5z\"\/><\/g><\/svg>",
7575
"path": "./dotfiles.md"
7676
},
77+
{
78+
"title": "User management",
79+
"description": "Learn about user roles available in Coder and how to create and manage users",
80+
"icon": "<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"\/><path d=\"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z\"\/><\/svg>",
81+
"path": "./users.md"
82+
},
7783
{
7884
"title": "Contributing",
79-
"description": "Learn how to contribute to Coder.",
85+
"description": "Learn how to contribute to Coder",
8086
"icon": "<svg width=\"20\" height=\"20\" fill=\"none\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5 2.5V12.5\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M15 7.5C16.3807 7.5 17.5 6.38071 17.5 5C17.5 3.61929 16.3807 2.5 15 2.5C13.6193 2.5 12.5 3.61929 12.5 5C12.5 6.38071 13.6193 7.5 15 7.5Z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M5 17.5C6.38071 17.5 7.5 16.3807 7.5 15C7.5 13.6193 6.38071 12.5 5 12.5C3.61929 12.5 2.5 13.6193 2.5 15C2.5 16.3807 3.61929 17.5 5 17.5Z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M15 7.5C15 9.48912 14.2098 11.3968 12.8033 12.8033C11.3968 14.2098 9.48912 15 7.5 15\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>",
8187
"path": "./CONTRIBUTING.md",
8288
"children": [
8389
{
8490
"title": "Code of Conduct",
85-
"description": "See the code of conduct for contributing to Coder.",
91+
"description": "See the code of conduct for contributing to Coder",
8692
"path": "./contributing/CODE_OF_CONDUCT.md"
8793
},
8894
{

docs/users.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# User management
2+
3+
This article walks you through the user roles available in Coder and creating and managing users.
4+
5+
## User roles
6+
7+
Coder offers three user roles:
8+
9+
* **Admin**: Has full access to the Coder system, including all workspaces, users, organizations, and templates
10+
* **Member**: Has limited access to Coder; can create workspaces using the templates and resources they have access to
11+
* **Auditor**: Has the same access rights as a **member**, as well as access to
12+
audit logs
13+
14+
## Create a user
15+
16+
To create a user with the web UI:
17+
18+
1. Log in as an admin.
19+
2. Go to **Users** > **New user**.
20+
3. In the window that opens, provide the **username**, **email**, and
21+
**password** for the user (they can opt to change their password after their
22+
initial login).
23+
4. Click **Submit** to create the user.
24+
25+
The new user will appear in the **Users** list. Use the toggle to change their
26+
**Roles** if desired.
27+
28+
To create a user via the Coder CLI, run:
29+
30+
```console
31+
coder users create
32+
```
33+
34+
When prompted, provide the **username** and **email** for the new user.
35+
36+
You'll receive a response that includes the following; share the instructions
37+
with the user so that they can log into Coder:
38+
39+
```console
40+
Download the Coder command line for your operating system:
41+
https://github.com/coder/coder/releases
42+
43+
Run coder login https://<accessURL>.coder.app to authenticate.
44+
45+
Your email is: email@exampleCo.com
46+
Your password is: <redacted>
47+
48+
Create a workspace coder create !
49+
```
50+
51+
## Suspend a user
52+
53+
Admins can suspend a user, removing the user's access to Coder.
54+
55+
To suspend a user via the web UI:
56+
57+
1. Go to **Users**.
58+
2. Find the user you want to suspend, click the vertical ellipsis to the right,
59+
and click **Suspend**.
60+
3. In the confirmation dialog, click **Suspend**.
61+
62+
To suspend a user via the CLI, run:
63+
64+
```console
65+
coder users suspend <username|user_id>
66+
```
67+
68+
Confirm the user suspension by typing **yes** and pressing **enter**.
69+
70+
## Activate a suspended user
71+
72+
Admins can activate a suspended user, restoring their access to Coder.
73+
74+
To activate a user via the web UI:
75+
76+
1. Go to **Users**.
77+
2. Find the user you want to activate, click the vertical ellipsis to the right,
78+
and click **Activate**.
79+
3. In the confirmation dialog, click **Activate**.
80+
81+
To activate a user via the CLI, run:
82+
83+
```console
84+
coder users activate <username|user_id>
85+
```
86+
87+
Confirm the user activation by typing **yes** and pressing **enter**.
88+
89+
## Reset a password
90+
91+
To reset a user's via the web UI:
92+
93+
1. Go to **Users**.
94+
2. Find the user whose password you want to reset, click the vertical ellipsis to the right,
95+
and select **Reset password**.
96+
3. Coder displays a temporary password that you can send to the user; copy the
97+
password and click **Reset password**.
98+
99+
Coder will prompt the user to change their temporary password immediately after logging in.
100+
101+
You can also reset a password via the CLI:
102+
103+
```console
104+
# run `coder reset-password <username> --help` for usage instructions
105+
coder reset-password <username>
106+
```

0 commit comments

Comments
 (0)