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

Hide feature InviteUsers to external people #215 #359

Closed
wants to merge 4 commits into from

Conversation

jdauphant
Copy link
Contributor

@jdauphant jdauphant commented Jan 5, 2023

Part of #215

Steps :

  • Basic implementation
  • Tested

@jdauphant jdauphant marked this pull request as draft January 5, 2023 11:22
@jdauphant
Copy link
Contributor Author

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");
Copy link
Contributor

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.

Copy link
Member

@odelcroi odelcroi Jan 18, 2023

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

@jdauphant
Copy link
Contributor Author

I will not go further in this PR.
We can planifiate it in a sprint

@odelcroi
Copy link
Member

Agreed, closing for now, feel free to reopen

@odelcroi odelcroi closed this Jan 18, 2023
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

Successfully merging this pull request may close these issues.

3 participants