matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.8k stars 2.13k forks source link

Allow to limit federation on a user level #13900

Open schiessle opened 2 years ago

schiessle commented 2 years ago

It would be great if the admin of a homeserver could limit/configure the federation capabilities on a per user basis.

Possible Use Cases:

  1. In a school you might want to allow teachers and maybe pupils from the secondary school to federate with people outside of the school. Pupils from the primary school should only be able to interact with people from the same school/homeserver. In a second step it could be even more fine-grained, for example teachers have no federation limits at all, pupils from the secondary school can federate with a list of "trusted homeservers", e.g. other schools you collaborate with, primary school pupils have federation disabled and can only chat with pupils on the same home server.

  2. Another usecase might be a private homeserver for a single family. The parents want to use the full capabilities of Matrix and the federation features while for the children it should be a save place where they can only communicate with the family members (no federation)

DMRobertson commented 2 years ago

I think this is tricky to do per-user because federation happens at the room level between entire homeservers. It would require some careful thought.

Some very rough and quick ideas:

schiessle commented 1 year ago

For rooms we already have the settings to create rooms, only accessible for people on the same homeserver:

image

Therefore I think such a setting on user level should be possible.

If federation is disabled for a user, than:

Or do I miss something?