Add customisation point for visibility of invites and room creation
Fixes https://github.com/vector-im/element-web/issues/19331
This commit is contained in:
parent
3417c03f41
commit
d99660d420
11 changed files with 146 additions and 43 deletions
|
@ -81,6 +81,8 @@ import GroupAvatar from "../views/avatars/GroupAvatar";
|
|||
import { useDispatcher } from "../../hooks/useDispatcher";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { shouldShowComponent } from "../../customisations/helpers/UIComponents";
|
||||
import { UIComponent } from "../../settings/UIFeature";
|
||||
|
||||
interface IProps {
|
||||
space: Room;
|
||||
|
@ -411,7 +413,7 @@ const SpaceLanding = ({ space }) => {
|
|||
const userId = cli.getUserId();
|
||||
|
||||
let inviteButton;
|
||||
if (myMembership === "join" && space.canInvite(userId)) {
|
||||
if (myMembership === "join" && space.canInvite(userId) && shouldShowComponent(UIComponent.InviteUsers)) {
|
||||
inviteButton = (
|
||||
<AccessibleButton
|
||||
kind="primary"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue