-
Notifications
You must be signed in to change notification settings - Fork 5
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
Hide feature InviteUsers to external people #215 #359
Conversation
This PR isn't a priority, it was made to solve a problem that have been solve in the backend instead. |
@@ -23,8 +24,12 @@ import { UIComponent } from "matrix-react-sdk/src/settings/UIFeature"; | |||
* otherwise. | |||
*/ | |||
function shouldShowComponent(component: UIComponent): boolean { | |||
const userId = MatrixClientPeg.get().getUserId(); | |||
const isExternal = userId.endsWith("agent.externe.tchap.gouv.fr") || userId.endsWith("agent.e.tchap.gouv.fr"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a function "isUserExternal" in the tchap files somewhere, so that we can reuse it later (we have not started extern customisation yet, but there will be many to do)
I would also add dev env, to avoid losing time with this when testing.
I don't know if there is a backend call we can do, or a property in MatrixClientPeg we can check, to know if a user is extern ? If we don't have anything clean like that, then this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean to add a config var to identify which are the external server? I agree it is the same problematic than #59
I will not go further in this PR. |
Agreed, closing for now, feel free to reopen |
Part of #215
Steps :