@smartkomm/plexus-cli 0.1.33 → 0.1.35

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
- 813edf9dc8e6e04f68ce3219db5546a854bfea5a75a251a7acba9a984965e65a
1
+ aafde774e99c32c2e37100c99081e6ec2eeccbacf544b5f9c13ad882e960b799
@@ -116,9 +116,7 @@ These need the **platform operator** (a `_platform.*` right). Ask them; do not
116
116
  try: everything under `platform …` (accounts across tenants, workers, the mail
117
117
  delivery monitor, cross-tenant imports, the hard delete of a person, signing
118
118
  connection set-up and key slots, the contract input-key registry), the
119
- `feedback`, `demo`, `setup`, `retention`, `jobs`, `audit` and `branding …`
120
- commands, `files put|delete` (a school sets its branding and library files
121
- through `config apply` or in the app), creating, onboarding or wiping a tenant
119
+ `feedback`, `demo`, `setup`, `retention`, `jobs` and `audit` commands, creating, onboarding or wiping a tenant
122
120
  (`config wipe`, `config prune-offers`, `config apply --scope platform`),
123
121
  `offer delete` (the hard delete), the settings listed above and issuing a token
124
122
  for someone else (`tokens create --for`). Every command's right is in
@@ -168,7 +166,7 @@ whole is the operator's (ask them; do not try).
168
166
  | [applications/correct-staff-input.md](references/applications/correct-staff-input.md) | Mandant | Correct an internal input staff set at the start, while no step has read it. |
169
167
  | [audit/answer-access-request.md](references/audit/answer-access-request.md) | Plattform | Answer an Art. 15 request: who looked at this application? |
170
168
  | [config/add-legal-entity.md](references/config/add-legal-entity.md) | Mandant | Add a Träger with its address or a unit to an exported config offline, then apply it. |
171
- | [config/attach-a-template.md](references/config/attach-a-template.md) | Mandant + Plattform | Put a template into the file library and attach it to a form field (`files put` and `files delete` need the operator; a school adds the file through `config apply` or the app). |
169
+ | [config/attach-a-template.md](references/config/attach-a-template.md) | Mandant | Put a template into the file library and attach it to a form field (`files put` / `files delete` need `administration.config.manage`). |
172
170
  | [config/export-tenant-setup.md](references/config/export-tenant-setup.md) | Plattform | Take a portable copy of a tenant's setup (config plus referenced files) into a new directory outside any repository. |
173
171
  | [config/init-tenant.md](references/config/init-tenant.md) | Plattform | Generate and apply a minimal valid tenant config without an existing source. |
174
172
  | [config/onboard-tenant.md](references/config/onboard-tenant.md) | Plattform | Set up or refresh a real tenant's config from a snapshot or another environment. |
@@ -176,7 +174,7 @@ whole is the operator's (ask them; do not try).
176
174
  | [config/platform-setup-export.md](references/config/platform-setup-export.md) | Plattform | Export the platform's own setup (the contract input registry) and restore it before a tenant whose setup names its keys. |
177
175
  | [config/restore-tenant-setup.md](references/config/restore-tenant-setup.md) | Plattform | Preview and apply a setup export directory onto its tenant, part by part. |
178
176
  | [config/list-setup-exports.md](references/config/list-setup-exports.md) | Plattform | List a tenant's nightly and manual setup exports and show what changed between two of them. |
179
- | [config/set-tenant-branding.md](references/config/set-tenant-branding.md) | Mandant + Plattform | Give the application portal colours, radius and fonts; upload logo and WOFF2 fonts (the `branding …` commands need the operator; a school uses `config apply`). |
177
+ | [config/set-tenant-branding.md](references/config/set-tenant-branding.md) | Mandant | Give the application portal colours, radius and fonts; upload logo and WOFF2 fonts (`branding …` needs `administration.config.manage`). |
180
178
  | [config/set-tenant-terms.md](references/config/set-tenant-terms.md) | Plattform | Switch a school from „Bewerbung" to „Anmeldung" throughout with one setting. |
181
179
  | [config/set-external-sign-in.md](references/config/set-external-sign-in.md) | Plattform | Choose how long the sign-in link in a school's letters works — once, N days, or without end. |
182
180
  | [config/set-up-billing-catalog.md](references/config/set-up-billing-catalog.md) | Mandant + Plattform | Load articles, packages, reduction tiers and Word templates by stable keys (catalog plan/apply). |
@@ -198,7 +196,7 @@ whole is the operator's (ask them; do not try).
198
196
  | [offer/add-workflow-node.md](references/offer/add-workflow-node.md) | Mandant | Insert a node (approval, form, contract, collectPayment, end …) into the workflow. |
199
197
  | [offer/addresses.md](references/offer/addresses.md) | Mandant | How a node reads by full address ($node…, $task…, $derived…, $env…), which flag sets which field, and the gate codes. |
200
198
  | [offer/appointment-task.md](references/offer/appointment-task.md) | Mandant | Give a booked appointment its appointment task (held by the host, due N days after the end). |
201
- | [offer/assignment-rule.md](references/offer/assignment-rule.md) | Mandant + Plattform | Change, test and publish who is responsible per slot; replace a person who leaves (`users unset-group` runs with the school's token). |
199
+ | [offer/assignment-rule.md](references/offer/assignment-rule.md) | Mandant + Plattform | Change, test and publish who is responsible per slot; replace a person who leaves (`tenant-users groups revoke`). |
202
200
  | [offer/attach-form-to-workflow.md](references/offer/attach-form-to-workflow.md) | Mandant | Bind an existing or new SmartForm to a form node. |
203
201
  | [offer/author-form-scenarios.md](references/offer/author-form-scenarios.md) | Mandant | Add a form's test scenarios and $env variables. |
204
202
  | [offer/author-manifest-meta.md](references/offer/author-manifest-meta.md) | Mandant | Set the selection config and display order of an offer. |
@@ -244,7 +242,8 @@ whole is the operator's (ask them; do not try).
244
242
  | [users/change-login-email.md](references/users/change-login-email.md) | Plattform | Change an account's sign-in address. |
245
243
  | [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). |
246
244
  | [users/delete-permission-group.md](references/users/delete-permission-group.md) | Mandant | Delete an orphaned permission group. |
247
- | [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 …`). |
245
+ | [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, give or take groups (`tenant-users …`). |
246
+ | [users/set-staff-config-key.md](references/users/set-staff-config-key.md) | Mandant | Give a staff member the config key rules and the configuration name them by (`tenant-users set-key`, `invite --key`). |
248
247
  | [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. |
249
248
  | [users/grant-feedback-assignable.md](references/users/grant-feedback-assignable.md) | Plattform | Make a platform admin assignable for feedback. |
250
249
  | [users/set-password.md](references/users/set-password.md) | Plattform | Set or regenerate an existing user's password. |
@@ -1,21 +1,20 @@
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
- 284 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
4
+ 285 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 (offline)](#admission-offline) (1)
8
8
  - [Admission (platform operator)](#admission-platform-operator) (2)
9
9
  - [Admission (school token)](#admission-school-token) (12)
10
10
  - [Agents (offline)](#agents-offline) (2)
11
- - [Branding (platform operator)](#branding-platform-operator) (6)
11
+ - [Branding (school token)](#branding-school-token) (6)
12
12
  - [Config (offline)](#config-offline) (4)
13
13
  - [Config (school token)](#config-school-token) (6)
14
14
  - [Contracts (platform operator)](#contracts-platform-operator) (5)
15
15
  - [Contracts (school token)](#contracts-school-token) (19)
16
16
  - [Feedback (platform operator)](#feedback-platform-operator) (21)
17
- - [Files (platform operator)](#files-platform-operator) (2)
18
- - [Files (school token)](#files-school-token) (1)
17
+ - [Files (school token)](#files-school-token) (3)
19
18
  - [Identity (own account)](#identity-own-account) (5)
20
19
  - [Imports (platform operator)](#imports-platform-operator) (2)
21
20
  - [Imports (school token)](#imports-school-token) (2)
@@ -37,9 +36,9 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
37
36
  - [Signing (school token)](#signing-school-token) (8)
38
37
  - [Stammdaten (platform operator)](#stammdaten-platform-operator) (2)
39
38
  - [Stripe (school token)](#stripe-school-token) (3)
40
- - [Tenant users (school token)](#tenant-users-school-token) (14)
39
+ - [Tenant users (school token)](#tenant-users-school-token) (17)
41
40
  - [Users (platform operator)](#users-platform-operator) (15)
42
- - [Users (school token)](#users-school-token) (5)
41
+ - [Users (school token)](#users-school-token) (3)
43
42
  - [Work-Items (school token)](#work-items-school-token) (5)
44
43
 
45
44
  ## Admission (offline)
@@ -227,13 +226,13 @@ Show the shared platform/CLI agent tool schemas and skill revision.
227
226
  - **Right:** offline — no deployment
228
227
  - **Effect:** read — changes nothing on the deployment
229
228
 
230
- ## Branding (platform operator)
229
+ ## Branding (school token)
231
230
 
232
231
  ### `branding clear-font`
233
232
 
234
- Remove a tenant's portal font file for a slot (platform-admin; the family stays)
233
+ Remove a tenant's portal font file for a slot (the family stays)
235
234
 
236
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
235
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
237
236
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
238
237
 
239
238
  | Option | Description |
@@ -242,16 +241,16 @@ Remove a tenant's portal font file for a slot (platform-admin; the family stays)
242
241
 
243
242
  ### `branding clear-logo`
244
243
 
245
- Remove a tenant's portal logo (platform-admin)
244
+ Remove a tenant's portal logo
246
245
 
247
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
246
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
248
247
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
249
248
 
250
249
  ### `branding set-font`
251
250
 
252
- Upload a tenant's portal font file (WOFF2) for a slot (platform-admin)
251
+ Upload a tenant's portal font file (WOFF2) for a slot
253
252
 
254
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
253
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
255
254
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
256
255
 
257
256
  | Option | Description |
@@ -261,9 +260,9 @@ Upload a tenant's portal font file (WOFF2) for a slot (platform-admin)
261
260
 
262
261
  ### `branding set-logo`
263
262
 
264
- Upload a tenant's portal logo (platform-admin)
263
+ Upload a tenant's portal logo
265
264
 
266
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
265
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
267
266
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
268
267
 
269
268
  | Option | Description |
@@ -273,9 +272,9 @@ Upload a tenant's portal logo (platform-admin)
273
272
 
274
273
  ### `branding set-theme`
275
274
 
276
- Set a tenant's portal theme tokens from a JSON file (platform-admin)
275
+ Set a tenant's portal theme tokens from a JSON file
277
276
 
278
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
277
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
279
278
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
280
279
 
281
280
  | Option | Description |
@@ -284,9 +283,9 @@ Set a tenant's portal theme tokens from a JSON file (platform-admin)
284
283
 
285
284
  ### `branding show`
286
285
 
287
- Show a tenant's current branding + resolved logo and font-file URLs (platform-admin)
286
+ Show a tenant's current branding + resolved logo and font-file URLs
288
287
 
289
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
288
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
290
289
  - **Effect:** read — changes nothing on the deployment
291
290
 
292
291
  ## Config (offline)
@@ -927,24 +926,31 @@ Detach a tag from a feedback item (uses the active --tenant).
927
926
  - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
928
927
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
929
928
 
930
- ## Files (platform operator)
929
+ ## Files (school token)
931
930
 
932
931
  ### `files delete <key>`
933
932
 
934
933
  Delete a library file — plan unless --confirm; refused while a form uses it / Datei löschen
935
934
 
936
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
935
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
937
936
  - **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
938
937
 
939
938
  | Option | Description |
940
939
  |---|---|
941
940
  | `--confirm` | Delete (without it, only the plan is printed). |
942
941
 
942
+ ### `files list`
943
+
944
+ List a tenant's file library (Vorlagen) / Dateien auflisten
945
+
946
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
947
+ - **Effect:** read — changes nothing on the deployment
948
+
943
949
  ### `files put <key> <path>`
944
950
 
945
951
  Create or replace a library file by key / Datei anlegen oder ersetzen
946
952
 
947
- - **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
953
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
948
954
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
949
955
 
950
956
  | Option | Description |
@@ -953,15 +959,6 @@ Create or replace a library file by key / Datei anlegen oder ersetzen
953
959
  | `--label-en <value>` | English label (required for a new key) |
954
960
  | `--file-name <value>` | Download name (default: the local file name) |
955
961
 
956
- ## Files (school token)
957
-
958
- ### `files list`
959
-
960
- List a tenant's file library (Vorlagen) / Dateien auflisten
961
-
962
- - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
963
- - **Effect:** read — changes nothing on the deployment
964
-
965
962
  ## Identity (own account)
966
963
 
967
964
  ### `tenants`
@@ -3371,6 +3368,18 @@ Deactivate a user in this school (reversible, groups kept but without effect, AP
3371
3368
  | `--successor <value>` | Who takes over their open applications and tasks (email or account id) — required while they hold any; the dry run lists the candidates. |
3372
3369
  | `--confirm` | Write (without it, only the handover plan is printed). |
3373
3370
 
3371
+ ### `tenant-users groups add <email|userId>`
3372
+
3373
+ Add a user of the school to a permission group, school-wide or in one unit (needs administration.permissions.manage).
3374
+
3375
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3376
+ - **Effect:** write — needs `--env`; on production also `--allow-prod`
3377
+
3378
+ | Option | Description |
3379
+ |---|---|
3380
+ | `--group <value>` (required) | A staff group, by key, id or exact label (`tenant-users groups list`). |
3381
+ | `--unit <value>` | The unit the group applies in, by key (`tenant-users units list`); school-wide without it. |
3382
+
3374
3383
  ### `tenant-users groups list`
3375
3384
 
3376
3385
  List the school's staff groups — the options of `tenant-users list --group` and `tenant-users invite --group`.
@@ -3378,6 +3387,20 @@ List the school's staff groups — the options of `tenant-users list --group` an
3378
3387
  - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3379
3388
  - **Effect:** read — changes nothing on the deployment
3380
3389
 
3390
+ ### `tenant-users groups revoke <email|userId>`
3391
+
3392
+ Remove a user of the school from a permission group (needs administration.permissions.manage) — plan unless --confirm; the last staff group ends their staff status.
3393
+
3394
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3395
+ - **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
3396
+
3397
+ | Option | Description |
3398
+ |---|---|
3399
+ | `--group <value>` (required) | The group, by key, id or exact label. |
3400
+ | `--unit <value>` | The membership's unit, by key; the school-wide membership without it. |
3401
+ | `--successor <value>` | Who takes over their open applications and tasks (email or account id), when this ends their staff status. |
3402
+ | `--confirm` | Write (without it, only the plan is printed). |
3403
+
3381
3404
  ### `tenant-users history <email|userId>`
3382
3405
 
3383
3406
  The Verlauf of one user in the school: who changed what, newest first.
@@ -3400,6 +3423,7 @@ Invite a new member of staff to this school: account, access and a one-time sign
3400
3423
  | `--language <value>` (required) | de or en — the letters' language of a new account. |
3401
3424
  | `--group <value>` | A staff group, by key, id or exact label (`tenant-users groups list`); needs administration.permissions.manage. |
3402
3425
  | `--unit <value>` | The group's unit, by its key (`tenant-users units list`); only with --group. |
3426
+ | `--key <value>` | The person's config key — the handle assignment rules and tenant config name them by (unique in the school; see `tenant-users set-key`). |
3403
3427
  | `--confirm` | Write and mail (without it, only the plan is printed). |
3404
3428
 
3405
3429
  ### `tenant-users list`
@@ -3454,9 +3478,21 @@ Mail a user of this school a password-reset link (active users only); only the p
3454
3478
  - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3455
3479
  - **Effect:** write — needs `--env`; on production also `--allow-prod`
3456
3480
 
3481
+ ### `tenant-users set-key <email|userId>`
3482
+
3483
+ Set a staff member's config key — the handle assignment rules and tenant config name them by (unique in the school) — plan unless --confirm.
3484
+
3485
+ - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3486
+ - **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
3487
+
3488
+ | Option | Description |
3489
+ |---|---|
3490
+ | `--key <value>` (required) | Lower-case letters, digits, - and _, starting with a letter (at most 64). |
3491
+ | `--confirm` | Write (without it, only the plan is printed). |
3492
+
3457
3493
  ### `tenant-users show <email|userId>`
3458
3494
 
3459
- Show one user of the school: status, groups, last sign-in, whether a signature is stored.
3495
+ Show one user of the school: status, groups, config key (and who gave it), last sign-in, whether a signature is stored.
3460
3496
 
3461
3497
  - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3462
3498
  - **Effect:** read — changes nothing on the deployment
@@ -3678,29 +3714,6 @@ Delete a tenant permission group (hard; refuses while in use).
3678
3714
  |---|---|
3679
3715
  | `--confirm` | Required: actually delete (else dry-run) |
3680
3716
 
3681
- ### `users set-group <email>`
3682
-
3683
- Add a user to a permission group in a tenant.
3684
-
3685
- - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3686
- - **Effect:** write — needs `--env`; on production also `--allow-prod`
3687
-
3688
- | Option | Description |
3689
- |---|---|
3690
- | `--group <value>` (required) | Permission group key. |
3691
-
3692
- ### `users unset-group <email>`
3693
-
3694
- Remove a user from a permission group in a tenant.
3695
-
3696
- - **Right:** school token — a module permission inside one school (the school's own administrator runs it)
3697
- - **Effect:** write — needs `--env`; on production also `--allow-prod`
3698
-
3699
- | Option | Description |
3700
- |---|---|
3701
- | `--group <value>` (required) | Permission group key. |
3702
- | `--replace-with <value>` | configKey of the staff member who takes over their active applications — required while they are responsible for any. A rule naming them refuses regardless: change it first (workflow editor: „Person ersetzen“, then publish) |
3703
-
3704
3717
  ## Work-Items (school token)
3705
3718
 
3706
3719
  ### `work-items assign <workItemId>`
@@ -12,8 +12,13 @@ every form at once — no republish.
12
12
 
13
13
  ## Prerequisites
14
14
 
15
- - `plexus-cli` installed; a platform-admin token with `_platform.config.manage`
16
- for the target env (listing needs `_platform.config.read`).
15
+ - `plexus-cli` installed; for the target env either the school's own token
16
+ holding `administration.config.manage` tenant-wide (listing needs
17
+ `administration.config.read`; see
18
+ [CLI access for a tenant admin](../users/cli-access-for-tenant-admin.md)), or a
19
+ platform-admin token with `_platform.config.manage` (listing:
20
+ `_platform.config.read`). The in-app right `stammdaten._self.configure` alone
21
+ is refused by the CLI.
17
22
  - The `files` commands and the `fileKey` attachment shape must be **live** on
18
23
  the target env before an offer that uses them is published (a platform
19
24
  operator rolls a release out to staging, then prod). An offer published before
@@ -12,10 +12,11 @@ uploaded logo and uploaded font files — on staging and/or prod, without a rese
12
12
  same right that gates `config apply`), or — for your OWN tenant only — a tenant
13
13
  admin's token holding `administration.config.manage` (see
14
14
  [CLI access for a tenant admin](../users/cli-access-for-tenant-admin.md)). Such a
15
- token changes branding **only through `config apply`** (branding is one of the few
16
- `tenant.*` settings it may change); every `plexus-cli branding …` command needs the
17
- platform right and refuses it. A local admin key without a user identity does **not**
18
- satisfy this gate.
15
+ token runs every `plexus-cli branding …` command and `config apply` for its own
16
+ tenant (branding is one of the `tenant.*` settings a school may change); `branding
17
+ show` needs `administration.config.read` at least. The in-app right
18
+ `administration.branding.manage` alone is refused by the CLI. A local admin key
19
+ without a user identity does **not** satisfy this gate.
19
20
  - The `plexus-cli branding …` commands must be **live on the target env** first (they
20
21
  call backend functions of the same release). A platform operator rolls a release out
21
22
  to staging, then prod; only then run the CLI.
@@ -118,7 +119,7 @@ plexus-cli --env prod --tenant <slug> branding show
118
119
  `set-font` are surgical.
119
120
  - **Admin UI.** A tenant admin (holding `administration.branding.manage`) edits the same
120
121
  row live under **Administration → Branding**. Use it for quick per-tenant tweaks; use the CLI
121
- for reproducible, cross-env rollout by a platform admin.
122
+ for reproducible, cross-env rollout.
122
123
 
123
124
  ## Gotchas
124
125
 
@@ -131,7 +131,7 @@ a fixed person.
131
131
 
132
132
  ## A staff member leaves
133
133
 
134
- A person a rule names — as a row's person or in a „Reihum" pool — cannot leave the staff (`platform users revoke`, `users unset-group`,
134
+ A person a rule names — as a row's person or in a „Reihum" pool — cannot leave the staff (`platform users revoke`, `tenant-users groups revoke`,
135
135
  `platform users archive`), leave a team whose slot names them, and a team a rule has a slot
136
136
  for cannot be deleted — refused (`[CONFLICT] [assignment/ruleReferences] …`), naming offer
137
137
  (label + status), slot and row. The check reads every `wip` and published offer
@@ -144,11 +144,11 @@ version (archived ones only run pinned test starts, which fail loud instead). Or
144
144
  3. Only then remove the group membership:
145
145
 
146
146
  ```bash
147
- plexus-cli --env staging --tenant <slug> users unset-group ada@example.com --group sekretariat \
148
- --replace-with <successorConfigKey>
147
+ plexus-cli --env staging --tenant <slug> tenant-users groups revoke ada@example.com --group sekretariat \
148
+ --successor <successor-email> --confirm
149
149
  ```
150
150
 
151
- `--replace-with` only hands the person's **active applications** over (required
151
+ `--successor` only hands the person's **active applications** over (required
152
152
  while they are responsible for any); it never rewrites a rule.
153
153
  4. Nothing to export or keep elsewhere — the server is the source of truth.
154
154
 
@@ -61,7 +61,7 @@ sequence, and the address never reaches the visible text.
61
61
  - The password is shown **once**; if you didn't capture it, re-run with `--out …`
62
62
  to mint a fresh one.
63
63
  - This both **grants tenant access and creates a login credential** — contrast
64
- `platform users grant` / `users set-group`, which only adjust access and group membership for
64
+ `platform users grant` / `tenant-users groups add`, which only adjust access and group membership for
65
65
  a user who already exists. `platform users grant` REFUSES an unknown address (it
66
66
  has no name or password channel, so any identity it created could never log in);
67
67
  provision the account first, here.
@@ -9,7 +9,7 @@ create and rename but **not** delete.
9
9
  - A stray group ("Neue Berechtigungsgruppe") with no members.
10
10
  - A team that was retired and whose work has been re-pointed elsewhere.
11
11
 
12
- Not for: taking someone's access away — that is `users unset-group` (leave the
12
+ Not for: taking someone's access away — that is `tenant-users groups revoke` (leave the
13
13
  group, keep the tenant) or `platform users revoke` (revoke tenant access).
14
14
 
15
15
  ## Prerequisites
@@ -46,7 +46,7 @@ platform operator can confirm it in a `config export` (`foundation.permissionGro
46
46
 
47
47
  | Refusal | Meaning | Fix first |
48
48
  |---|---|---|
49
- | `has-members` | Someone is still in the group (the message names them) | `users unset-group` each |
49
+ | `has-members` | Someone is still in the group (the message names them) | `tenant-users groups revoke` each |
50
50
  | `owns-teams` | A running application binds this group as a work owner | Re-assign those applications |
51
51
  | `referenced-by-workflow` | A stored graph routes a decision/assign (or a not-yet-migrated legacy team-owner binding) to this key | Re-point the node, re-publish |
52
52
  | `structural` | It is `tenant_admin` | — (never deletable) |
@@ -60,7 +60,7 @@ plexus-cli --env <env> --tenant <slug> tenant-users reactivate <email>
60
60
  ```
61
61
 
62
62
  A deactivated person gets their groups back at once; an archived one starts
63
- without groups — assign them in the app (needs `administration.permissions.manage`).
63
+ without groups — give them with step 8 (needs `administration.permissions.manage`).
64
64
 
65
65
  **4 — invite a new person.** Without `--confirm` the command only prints whom it
66
66
  would invite, in which group and unit; with it, the account and the access are
@@ -115,10 +115,27 @@ plexus-cli --env <env> --tenant <slug> tenant-users signature request <email>
115
115
 
116
116
  Only the person can store, replace or remove their own signature.
117
117
 
118
+ **8 — give or take a permission group** (needs `administration.permissions.manage`
119
+ as well — tenant-wide for a group without `--unit`, for that unit with it):
120
+
121
+ ```bash
122
+ plexus-cli --env <env> --tenant <slug> tenant-users groups add <email> --group <key> [--unit <unit-key>]
123
+ plexus-cli --env <env> --tenant <slug> tenant-users groups revoke <email> --group <key> [--unit <unit-key>]
124
+ plexus-cli --env <env> --tenant <slug> tenant-users groups revoke <email> --group <key> --successor <colleague-email> --confirm
125
+ ```
126
+
127
+ `groups revoke` plans unless `--confirm`. If it takes the person's last staff
128
+ group they leave the staff: refused while a responsibility rule names them, and
129
+ their open applications and tasks need `--successor` (the plan of
130
+ `tenant-users deactivate <email>` lists what would move and who may take over).
131
+
132
+ **9 — give them a config key** — the handle responsibility rules and the
133
+ configuration name them by: [Give a staff member a config key](./set-staff-config-key.md).
134
+
118
135
  ## Verify
119
136
 
120
137
  ```bash
121
- plexus-cli --env <env> --tenant <slug> tenant-users show <email> # status, groups, signature yes/no
138
+ plexus-cli --env <env> --tenant <slug> tenant-users show <email> # status, groups, key, signature yes/no
122
139
  plexus-cli --env <env> --tenant <slug> tenant-users history <email> # one Verlauf row per change
123
140
  ```
124
141
 
@@ -0,0 +1,70 @@
1
+ # Give a staff member a config key
2
+
3
+ **When to use:** a responsibility rule or the school's configuration must name a
4
+ member of staff — and that person has no key yet (they were invited in the app or
5
+ the CLI), or their key should read better than a drawn `staff_…` one. The key is
6
+ the stable handle rules and configuration name a person by: it survives a change
7
+ of the sign-in address, never their name.
8
+
9
+ A **school's token suffices**: `tenant-users set-key` asks for
10
+ `administration.users.manage` in the school, like every `tenant-users` command.
11
+
12
+ ## Prerequisites
13
+ - A `plx_…` token and `default_tenant` (or `--tenant <slug>`) — see
14
+ [CLI access for a tenant admin](./cli-access-for-tenant-admin.md).
15
+ - `--env` is required for every write; prod also needs `--allow-prod`.
16
+ - The person is a user of the school (`tenant-users list`), not archived.
17
+
18
+ ## Steps
19
+
20
+ **1 — see who holds which key** (the `key` column names who gave it: `config` —
21
+ declared in the configuration, `rule` — drawn when a rule picked the person,
22
+ `admin` — set in the user administration):
23
+
24
+ ```bash
25
+ plexus-cli --env <env> --tenant <slug> tenant-users list
26
+ plexus-cli --env <env> --tenant <slug> tenant-users show <email>
27
+ ```
28
+
29
+ **2 — set the key.** Without `--confirm` the command prints the old and the new
30
+ key; with it, the key is written and one Verlauf row records it:
31
+
32
+ ```bash
33
+ plexus-cli --env <env> --tenant <slug> tenant-users set-key <email> --key <key>
34
+ plexus-cli --env <env> --tenant <slug> tenant-users set-key <email> --key <key> --confirm
35
+ ```
36
+
37
+ A new member can get the key with the invitation:
38
+
39
+ ```bash
40
+ plexus-cli --env <env> --tenant <slug> tenant-users invite --first-name <first> --last-name <last> --email <email> --language de --key <key> --confirm
41
+ ```
42
+
43
+ In the app: *Administration → Nutzer* → the person → *Konto* → *Schlüssel* →
44
+ „Ändern".
45
+
46
+ ## Verify
47
+
48
+ ```bash
49
+ plexus-cli --env <env> --tenant <slug> tenant-users show <email> # key <key> (admin)
50
+ plexus-cli --env <env> --tenant <slug> tenant-users history <email> # key … → <key>
51
+ ```
52
+
53
+ ## Idempotency / gotchas
54
+ - A key is lower-case letters, digits, `-` and `_`, starts with a letter and has
55
+ at most 64 characters (`[tenantUsers/configKey]` otherwise).
56
+ - A key names one person per school: a key someone else holds is refused, naming
57
+ them (`[tenantUsers/configKeyTaken]`) — nothing is taken away from anyone.
58
+ - Renaming a key a responsibility rule names is refused
59
+ (`[assignment/ruleReferences]`, the same refusal as for a configuration that
60
+ re-keys the person): change the rule first (workflow editor, then publish).
61
+ - Setting the key the person already holds changes nothing and writes no Verlauf row.
62
+ - A key declared in the configuration stays the configuration's: the next
63
+ `config apply` writes the configured key back. Change it there instead
64
+ (`config export`, edit `foundation.users`, `config apply`).
65
+ - A key set here (or drawn by a rule) does not make the person a configuration
66
+ user: `config export` leaves them out of `foundation.users`.
67
+
68
+ ## Related
69
+ - [Manage a school's users](./manage-school-users.md) — invite, groups, deactivate.
70
+ - [Change, test and publish a responsibility rule](../offer/assignment-rule.md) — rules name people by this key.