Watch
0
0
Fork
You've already forked hyperhive
0

keep the operator matrix admin grant record in nats kv, not on disk

This commit is contained in:
atlas 2026-11-22 23:33:40 +01:00
commit 28d847cb7e

View file

@ -136,13 +136,15 @@ each member not yet in `#admins:<server_name>` it sends
lands on.
- **Leaving `admins` revokes what the sync granted.** The controller
records each account it sends a grant for in
`/var/lib/swarm-controller/operator-matrix-admins.json`. When one of
them is no longer in `admins` but still in `#admins`, it sends
records each account it sends a grant for under the key `granted` of the
`operator-matrix-admins` NATS KV bucket, which only the controller writes.
An upgraded controller imports the old
`/var/lib/swarm-controller/operator-matrix-admins.json` once and deletes it.
When one of them is no longer in `admins` but still in `#admins`, it sends
`!admin users force-leave-room @<name>:<server_name> <admin room id>`
there as `@swarm`; leaving that room is what ends homeserver admin.
- **Admins the sync didn't make keep admin.** An admin missing from that
file, `@swarm`, the server user `@conduit:<server_name>`, every agent's
record, `@swarm`, the server user `@conduit:<server_name>`, every agent's
account, and every user id in
`services.hyperhive.deploy.swarm-controller.matrixAdminSync.ignoreUsers` are never
revoked.