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

Disable "Invite to this room button" with federation off" and don't allow invites to external folks with whitelist set to not allow external folks #18792

Closed
rtanglao opened this issue Aug 26, 2021 · 6 comments
Labels
A-Federation A-Invite O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Low/no impact on users T-Enhancement

Comments

@rtanglao
Copy link

rtanglao commented Aug 26, 2021

Your use case

What would you like to do?

EMS Customers would like to disable the invite button with federation off.
They would also like to disable invites to external folks when the whitelist is set to to internal folks only/

Why would you like to do it?

To prevent "leaking" the server to external folks when federation is off

How would you like to achieve it?

Perhaps a config flag option in Element to hide that button
(or at least stop email invites)?

Have you considered any alternatives?

No response

Additional context

For those who have access, see:

  1. https://github.com/matrix-org/matrix-hosted/issues/3355 (parallel issue for EMS_)
  2. https://newvector.zammad.com/#ticket/zoom/14756 (customer with this issue)
@SimonBrandner SimonBrandner added A-Federation A-Invite O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Aug 26, 2021
@germain-gg germain-gg added the S-Tolerable Low/no impact on users label Aug 31, 2021
@flyinghuman
Copy link

flyinghuman commented Jan 20, 2022

Same here. Would be good to disable email-invites in Element which lead to element.io instead to own homeserver.

@t3chguy
Copy link
Member

t3chguy commented Jan 25, 2022

Keep in mind Matrix has no concept of "federation off" at a server level - so neither do clients. Each individual room can have federation disabled using m.federate=false at creation time.

You can disable 3pid stuff in the config.json already

https://github.com/vector-im/element-web/blob/develop/docs/config.md#ui-features UIFeature.identityServer

(or at least stop email invites)?

This should be done at the server level by inhibiting the 3pid APIs, given Element Desktop etc won't have the aforementioned UIFeature inhibited due to it having a local config.json file.

@flyinghuman
Copy link

yeah, it would also be good that element loads the config.json from the homeserver the user is logged in so that the homeserver-provider can centrally define the configuration at least for element clients.

Matrix has the Server Discovery Feature which can be used for that: https://spec.matrix.org/latest/client-server-api/#get-well-known-matrix-client

Element could grab the config-URL from this file https://TLD/.well-known/matrix/client with its content:

{
  "m.homeserver": {
    "base_url": "https://matrix.example.com"
  },
  "m.identity_server": {
    "base_url": "https://identity.example.com"
  },
  "org.element": {
    "config_url": "https://matix..example.com/config.json"
  }
}

Actually it is not possible via config.json to disable invite via mail (correct?). Would be good that this would be possible.

@t3chguy
Copy link
Member

t3chguy commented Jan 25, 2022

Actually it is not possible via config.json to disable invite via mail (correct?). Would be good that this would be possible.

See https://github.com/vector-im/element-web/blob/develop/docs/config.md#ui-features UIFeature.identityServer ...

@t3chguy
Copy link
Member

t3chguy commented Jan 25, 2022

Element could grab the config-URL from this file https://TLD/.well-known/matrix/client with its content:

This is a separate issue and would need product input and a lot of thought given that loading a new config.json can change the default server and cause all sorts of confusion, also the branding flashing and changing as you switch servers would be jarring, and many many other points of confusion.

@turt2live
Copy link
Member

Hiding the invite button is a hard thing to justify in an app like ours, but I've split the unfederatable room issue to #22102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Federation A-Invite O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Low/no impact on users T-Enhancement
Projects
None yet
Development

No branches or pull requests

6 participants