@smartkomm/plexus-cli 0.1.19 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 3ded39591e0569fd405566b3337a2b6e7c20b6f78fed3e83fef89190c71ed85f
1
+ 708ba1ab9377bc1246bb097487a57daa2c5c3556d666ec55348d483cd6510733
@@ -234,7 +234,7 @@ whole is the operator's (ask them; do not try).
234
234
  | [users/change-login-email.md](references/users/change-login-email.md) | Plattform | Change an account's sign-in address. |
235
235
  | [users/cli-access-for-tenant-admin.md](references/users/cli-access-for-tenant-admin.md) | Mandant + Plattform | Give a school's administrator a CLI token for exactly their tenant (minting it themselves suffices; issuing it for them with `tokens create --for` needs the operator). |
236
236
  | [users/delete-permission-group.md](references/users/delete-permission-group.md) | Mandant | Delete an orphaned permission group. |
237
- | [users/manage-school-users.md](references/users/manage-school-users.md) | Mandant | List, deactivate (with handover), archive and reactivate the school's users; switch their mail categories, ask for a signature (`tenant-users …`). |
237
+ | [users/manage-school-users.md](references/users/manage-school-users.md) | Mandant | List, invite, deactivate (with handover), archive and reactivate the school's users; send a sign-in or password-reset link, switch their mail categories, ask for a signature (`tenant-users …`). |
238
238
  | [users/grant-cross-tenant-access.md](references/users/grant-cross-tenant-access.md) | Plattform | Give every user of every tenant access to the test tenant. |
239
239
  | [users/grant-feedback-assignable.md](references/users/grant-feedback-assignable.md) | Plattform | Make a platform admin assignable for feedback. |
240
240
  | [users/set-password.md](references/users/set-password.md) | Plattform | Set or regenerate an existing user's password. |
@@ -1,7 +1,7 @@
1
1
  # plexus-cli command reference
2
2
 
3
3
  Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
4
- 286 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
4
+ 290 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
5
5
  `--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
6
6
 
7
7
  - [Admission](#admission) (15)
@@ -26,7 +26,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
26
26
  - [Signing](#signing) (13)
27
27
  - [Stammdaten](#stammdaten) (2)
28
28
  - [Stripe](#stripe) (3)
29
- - [Tenant users](#tenant-users) (10)
29
+ - [Tenant users](#tenant-users) (14)
30
30
  - [Users](#users) (20)
31
31
  - [Work-Items](#work-items) (5)
32
32
 
@@ -3173,7 +3173,7 @@ Deactivate a user in this school (reversible, groups kept but without effect, AP
3173
3173
 
3174
3174
  ### `tenant-users groups list`
3175
3175
 
3176
- List the school's staff groups — the options of `tenant-users list --group`.
3176
+ List the school's staff groups — the options of `tenant-users list --group` and `tenant-users invite --group`.
3177
3177
 
3178
3178
  - **Effect:** read — changes nothing on the deployment
3179
3179
 
@@ -3183,6 +3183,22 @@ The Verlauf of one user in the school: who changed what, newest first.
3183
3183
 
3184
3184
  - **Effect:** read — changes nothing on the deployment
3185
3185
 
3186
+ ### `tenant-users invite`
3187
+
3188
+ Invite a new member of staff to this school: account, access and a one-time sign-in link by mail — plan unless --confirm.
3189
+
3190
+ - **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
3191
+
3192
+ | Option | Description |
3193
+ |---|---|
3194
+ | `--first-name <value>` (required) | The person's first name. |
3195
+ | `--last-name <value>` (required) | The person's last name. |
3196
+ | `--email <value>` (required) | The sign-in address; the link goes there. |
3197
+ | `--language <value>` (required) | de or en — the letters' language of a new account. |
3198
+ | `--group <value>` | A staff group, by key, id or exact label (`tenant-users groups list`); needs administration.permissions.manage. |
3199
+ | `--unit <value>` | The group's unit, by its key (`tenant-users units list`); only with --group. |
3200
+ | `--confirm` | Write and mail (without it, only the plan is printed). |
3201
+
3186
3202
  ### `tenant-users list`
3187
3203
 
3188
3204
  List the school's users (Administration → Nutzer); archived ones only with --status archived.
@@ -3217,6 +3233,18 @@ Reactivate a deactivated or archived user in this school (an archived one starts
3217
3233
 
3218
3234
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
3219
3235
 
3236
+ ### `tenant-users send-login-link <email|userId>`
3237
+
3238
+ Mail a user of this school a fresh one-time sign-in link (active users only) — e.g. an invitation that expired.
3239
+
3240
+ - **Effect:** write — needs `--env`; on production also `--allow-prod`
3241
+
3242
+ ### `tenant-users send-password-reset <email|userId>`
3243
+
3244
+ Mail a user of this school a password-reset link (active users only); only the person sets the new password.
3245
+
3246
+ - **Effect:** write — needs `--env`; on production also `--allow-prod`
3247
+
3220
3248
  ### `tenant-users show <email|userId>`
3221
3249
 
3222
3250
  Show one user of the school: status, groups, last sign-in, whether a signature is stored.
@@ -3229,6 +3257,12 @@ Ask a user by mail to store their own signature — only while none is stored, a
3229
3257
 
3230
3258
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
3231
3259
 
3260
+ ### `tenant-users units list`
3261
+
3262
+ List the school's units by key — the options of `tenant-users invite --unit`.
3263
+
3264
+ - **Effect:** read — changes nothing on the deployment
3265
+
3232
3266
  ## Users
3233
3267
 
3234
3268
  ### `accounts email-changes`
@@ -2,16 +2,15 @@
2
2
 
3
3
  **When to use:** a school's administrator looks after the people of **their own
4
4
  school** from the shell — who is there and in which status, deactivate someone
5
- who leaves (handing their open work to a colleague), bring them back, switch
6
- their personal mail categories, ask them to store their signature. The same as
7
- *Administration → Nutzer* in the app, with the same rules and the same Verlauf.
5
+ who leaves (handing their open work to a colleague), bring them back, invite a
6
+ new person, send a sign-in or password-reset link, switch their personal mail
7
+ categories, ask them to store their signature. The same as *Administration →
8
+ Nutzer* in the app, with the same rules and the same Verlauf.
8
9
 
9
10
  A **school's token suffices**: every `tenant-users` command asks for
10
11
  `administration.users.manage` in the school (the `tenant_admin` group holds it);
11
- a platform operator passes with `_platform.users.manage`. Not here: inviting a
12
- new person, sending a sign-in link or a password-reset link — those are not in
13
- the CLI yet; use *Administration → Nutzer* in the app. The `users …` command group
14
- is the platform's cross-school surface and needs a platform operator.
12
+ a platform operator passes with `_platform.users.manage`. The `users …` command
13
+ group is the platform's cross-school surface and needs a platform operator.
15
14
 
16
15
  ## Prerequisites
17
16
  - A `plx_…` token for your own account and `default_tenant` (or `--tenant <slug>`)
@@ -63,7 +62,41 @@ plexus-cli --env <env> --tenant <slug> tenant-users reactivate <email>
63
62
  A deactivated person gets their groups back at once; an archived one starts
64
63
  without groups — assign them in the app (needs `administration.permissions.manage`).
65
64
 
66
- **4 — switch their personal mail categories:**
65
+ **4 — invite a new person.** Without `--confirm` the command only prints whom it
66
+ would invite, in which group and unit; with it, the account and the access are
67
+ created and a one-time sign-in link is mailed — always, there is no invitation
68
+ without one, and nobody sets a password for them:
69
+
70
+ ```bash
71
+ plexus-cli --env <env> --tenant <slug> tenant-users groups list # label, key, id
72
+ plexus-cli --env <env> --tenant <slug> tenant-users units list # label, key — for --unit
73
+ plexus-cli --env <env> --tenant <slug> tenant-users invite --first-name <first> --last-name <last> --email <email> --language de --group <key>
74
+ plexus-cli --env <env> --tenant <slug> tenant-users invite --first-name <first> --last-name <last> --email <email> --language de --group <key> --confirm
75
+ ```
76
+
77
+ - `--group` takes the key, the id or the exact label; `--unit <key>` (from
78
+ `tenant-users units list`) only together with `--group` — an unknown key is
79
+ refused by the backend. Giving a group needs
80
+ `administration.permissions.manage` as well — without it, invite without
81
+ `--group` and let someone who has it assign the group in the app.
82
+ - `--language` (`de` or `en`) is the language of the letters for a **new**
83
+ account; someone who already works at another school keeps their own.
84
+ - The backend refuses, and the command prints the refusal as it is: an address
85
+ that already has an access in this school (bring them back with `reactivate`
86
+ instead), and an address that cannot be invited as staff (for example a
87
+ family's account).
88
+
89
+ **5 — send a sign-in link or a password-reset link** (active users only):
90
+
91
+ ```bash
92
+ plexus-cli --env <env> --tenant <slug> tenant-users send-login-link <email> # e.g. the invitation's link expired
93
+ plexus-cli --env <env> --tenant <slug> tenant-users send-password-reset <email> # they set the new password themselves
94
+ ```
95
+
96
+ Both go out at every mail level; a deactivated or archived user gets neither —
97
+ `reactivate` first.
98
+
99
+ **6 — switch their personal mail categories:**
67
100
 
68
101
  ```bash
69
102
  plexus-cli --env <env> --tenant <slug> tenant-users notifications list <email>
@@ -73,7 +106,7 @@ plexus-cli --env <env> --tenant <slug> tenant-users notifications set <email> --
73
106
  The person is told by mail; they can switch it back themselves, and the latest
74
107
  change holds. Sign-in and security mail cannot be switched off.
75
108
 
76
- **5 — ask for their signature** (only while none is stored, at most once a day):
109
+ **7 — ask for their signature** (only while none is stored, at most once a day):
77
110
 
78
111
  ```bash
79
112
  plexus-cli --env <env> --tenant <slug> tenant-users signature request <email>