@smartkomm/plexus-cli 0.1.19 → 0.1.20
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.
- package/README.md +1 -1
- package/dist/cli.mjs +246 -185
- package/dist/skill/.managed-by-plexus-cli +1 -1
- package/dist/skill/SKILL.md +1 -1
- package/dist/skill/references/commands.md +31 -3
- package/dist/skill/references/users/manage-school-users.md +41 -9
- package/dist/spec.snapshot.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6bd1848e1a792dacbfc29a58eb3516ad4e8a34841abd0d93ff155b2f32fc858a
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -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
|
-
|
|
4
|
+
289 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) (
|
|
29
|
+
- [Tenant users](#tenant-users) (13)
|
|
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 config key or id (`org tree`); only with --group. Resolving it reads the organisation tree (administration.organizationStructure.manage). |
|
|
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.
|
|
@@ -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,
|
|
6
|
-
|
|
7
|
-
|
|
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`.
|
|
12
|
-
|
|
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,40 @@ 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 —
|
|
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 invite --first-name <first> --last-name <last> --email <email> --language de --group <key>
|
|
73
|
+
plexus-cli --env <env> --tenant <slug> tenant-users invite --first-name <first> --last-name <last> --email <email> --language de --group <key> --confirm
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- `--group` takes the key, the id or the exact label; `--unit <key>` (from
|
|
77
|
+
`org tree`) only together with `--group` — naming a unit reads the
|
|
78
|
+
organisation tree, which needs `administration.organizationStructure.manage`. Giving a group needs
|
|
79
|
+
`administration.permissions.manage` as well — without it, invite without
|
|
80
|
+
`--group` and let someone who has it assign the group in the app.
|
|
81
|
+
- `--language` (`de` or `en`) is the language of the letters for a **new**
|
|
82
|
+
account; someone who already works at another school keeps their own.
|
|
83
|
+
- The backend refuses, and the command prints the refusal as it is: an address
|
|
84
|
+
that already has an access in this school (bring them back with `reactivate`
|
|
85
|
+
instead), and an address that cannot be invited as staff (for example a
|
|
86
|
+
family's account).
|
|
87
|
+
|
|
88
|
+
**5 — send a sign-in link or a password-reset link** (active users only):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
plexus-cli --env <env> --tenant <slug> tenant-users send-login-link <email> # e.g. the invitation's link expired
|
|
92
|
+
plexus-cli --env <env> --tenant <slug> tenant-users send-password-reset <email> # they set the new password themselves
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Both go out at every mail level; a deactivated or archived user gets neither —
|
|
96
|
+
`reactivate` first.
|
|
97
|
+
|
|
98
|
+
**6 — switch their personal mail categories:**
|
|
67
99
|
|
|
68
100
|
```bash
|
|
69
101
|
plexus-cli --env <env> --tenant <slug> tenant-users notifications list <email>
|
|
@@ -73,7 +105,7 @@ plexus-cli --env <env> --tenant <slug> tenant-users notifications set <email> --
|
|
|
73
105
|
The person is told by mail; they can switch it back themselves, and the latest
|
|
74
106
|
change holds. Sign-in and security mail cannot be switched off.
|
|
75
107
|
|
|
76
|
-
**
|
|
108
|
+
**7 — ask for their signature** (only while none is stored, at most once a day):
|
|
77
109
|
|
|
78
110
|
```bash
|
|
79
111
|
plexus-cli --env <env> --tenant <slug> tenant-users signature request <email>
|