Andrey Antukh e6e6b20cbb 🐛 Announce access changes so subscriptions get revoked
The revocation watcher only helps if the mutations that can take
access away actually announce it. Seven of them now do, after the write
that changed access:

- delete-team-member and leave-team announce the affected member.
- update-team-member-role announces too. A role change never removes
  read on its own, but announcing lets the watcher decide from fresh
  data instead of assuming, which is what keeps a downgrade to viewer
  from being mistaken for a revocation.
- delete-file, delete-project, move-files and move-project announce to
  the whole team. Which profiles had the content open is only known to
  their own connections, and over-announcing is cheap: the watcher
  re-checks and closes nothing for members who keep access.

delete-share-link is deliberately excluded. A share-link visitor never
passes the websocket subscribe check, because `check-read-permissions!`
is called without a share-id and that arity only considers team
membership, so there is no subscription to revoke.

leave-team also gains the notification it never had: it published
nothing at all on the leaver's own topic, so a session that left kept
its editor open with no idea, while a removed member was told.

The topic and the publish helper move to `app.rpc.notifications`, next
to the other bus notifications. The command namespaces cannot require
the watcher itself: `app.http.websocket` already requires these command
namespaces, so that would be a cycle. The watcher keeps the subscription
registry, which is the part it owns.

Closes #12155

AI-assisted-by: space-bunny-free
2026-10-08 13:08:50 +02:00
..
2026-09-29 09:07:34 +02:00
2026-10-06 15:12:15 +02:00
2026-10-06 15:12:15 +02:00
2024-05-29 19:05:04 +02:00