Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support] Disable the Creation of Rooms and Spaces While Allowing DMs (One-on-One or Group) #18151

Open
LayBraid opened this issue Feb 10, 2025 · 0 comments

Comments

@LayBraid
Copy link

LayBraid commented Feb 10, 2025

πŸ“Œ Context and Objective
Hello,
We self-host a Synapse server with several pre-configured spaces.

Our objective is to:
βœ… Allow DMs (both one-on-one and group).
β›” Prevent the creation of new public or private rooms.
β›” Prevent the creation of new spaces.

We mainly want to enforce these restrictions to better manage resources and avoid the uncontrolled proliferation of rooms and spaces on our self-hosted infrastructure.

πŸ“Œ Current Management
To restrict the creation of rooms and spaces, we are currently using a plugin based on synapse-user-restrictions.
However, this plugin also blocks the ability to send DMs, which is an unwanted behavior.

πŸ” Research Conducted
Before asking this question, we explored different possibilities:

  • We identified that rooms have a type (room_type), specifically m.space for spaces.
    Reference: Synapse Admin API - Room Details.
  • We wonder if this information could be used to differentiate between spaces, rooms, and DMs to allow only DMs.
  • We noticed that the distinction between group DMs and standard rooms seems unclear in the permission management system.
    • Is there a reliable way to make this distinction?
    • Could room_type be used?
  • We are unsure about the current support for room_type in restriction rules:
    • Is this functionality poorly implemented, deprecated, or simply never considered for this use case?

❓ Questions

  • How can we prevent only the creation of rooms and spaces without blocking DMs?
  • Is room_type (e.g., "m.space") usable to restrict only the creation of spaces and rooms?

Thank you in advance for your help! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant