Docs: note User-Member Linking enforcement in code
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is failing

- update_user restricted via ActorIsAdmin; Form gates Member-Linking UI
This commit is contained in:
Moritz 2026-01-30 11:13:41 +01:00
parent cf6bd4a6a1
commit 6e13a3aa34
Signed by: moritz
GPG key ID: 1020A035E5DD0824
3 changed files with 3 additions and 4 deletions

View file

@ -2002,6 +2002,8 @@ Users and Members are separate entities that can be linked. Special rules:
- A user cannot link themselves to an existing member
- A user CAN create a new member and be directly linked to it (self-service)
**Enforcement:** The User resource restricts the `update_user` action (which accepts the `member` argument for link/unlink) to admins only via `Mv.Authorization.Checks.ActorIsAdmin`. The UserLive.Form shows the Member-Linking UI and runs member link/unlink on save only when the current user is admin; non-admins use the `:update` action (email only) for profile edit.
### Approach: Separate Ash Actions
We use **different Ash actions** to enforce different policies: