diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx index 637215682e..3e2c68de3a 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx @@ -33,6 +33,7 @@ import { logger } from "matrix-js-sdk/src/logger"; interface IEventShowOpts { isState?: boolean; hideForSpace?: boolean; + hideForRoom?: boolean; } interface IPowerLevelDescriptor { @@ -46,6 +47,7 @@ const plEventsToShow: Record = { [EventType.RoomAvatar]: { isState: true }, [EventType.RoomName]: { isState: true }, [EventType.RoomCanonicalAlias]: { isState: true }, + [EventType.SpaceChild]: { isState: true, hideForRoom: true }, [EventType.RoomHistoryVisibility]: { isState: true, hideForSpace: true }, [EventType.RoomPowerLevels]: { isState: true }, [EventType.RoomTopic]: { isState: true }, @@ -223,6 +225,7 @@ export default class RolesRoomSettingsTab extends React.Component { [EventType.RoomCanonicalAlias]: isSpaceRoom ? _td("Change main address for the space") : _td("Change main address for the room"), + [EventType.SpaceChild]: _td("Manage rooms in this space"), [EventType.RoomHistoryVisibility]: _td("Change history visibility"), [EventType.RoomPowerLevels]: _td("Change permissions"), [EventType.RoomTopic]: isSpaceRoom ? _td("Change description") : _td("Change topic"), @@ -413,6 +416,8 @@ export default class RolesRoomSettingsTab extends React.Component { const eventPowerSelectors = Object.keys(eventsLevels).map((eventType, i) => { if (isSpaceRoom && plEventsToShow[eventType].hideForSpace) { return null; + } else if (!isSpaceRoom && plEventsToShow[eventType].hideForRoom) { + return null; } let label = plEventsToLabels[eventType]; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 202b442e5a..61d4313b1c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1488,6 +1488,7 @@ "Change room name": "Change room name", "Change main address for the space": "Change main address for the space", "Change main address for the room": "Change main address for the room", + "Manage rooms in this space": "Manage rooms in this space", "Change history visibility": "Change history visibility", "Change permissions": "Change permissions", "Change description": "Change description",