Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ee9e1a7

Browse files
authored
Merge pull request #5838 from matrix-org/travis/add-acl-pl
Give server ACLs a name in 'roles & permissions' tab
2 parents f743007 + 073c055 commit ee9e1a7

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

src/components/views/settings/tabs/room/RolesRoomSettingsTab.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 New Vector Ltd
2+
Copyright 2019, 2021 The Matrix.org Foundation C.I.C.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -22,32 +22,35 @@ import * as sdk from "../../../../..";
2222
import AccessibleButton from "../../../elements/AccessibleButton";
2323
import Modal from "../../../../../Modal";
2424
import {replaceableComponent} from "../../../../../utils/replaceableComponent";
25+
import {EventType} from "matrix-js-sdk/src/@types/event";
2526

2627
const plEventsToLabels = {
2728
// These will be translated for us later.
28-
"m.room.avatar": _td("Change room avatar"),
29-
"m.room.name": _td("Change room name"),
30-
"m.room.canonical_alias": _td("Change main address for the room"),
31-
"m.room.history_visibility": _td("Change history visibility"),
32-
"m.room.power_levels": _td("Change permissions"),
33-
"m.room.topic": _td("Change topic"),
34-
"m.room.tombstone": _td("Upgrade the room"),
35-
"m.room.encryption": _td("Enable room encryption"),
29+
[EventType.RoomAvatar]: _td("Change room avatar"),
30+
[EventType.RoomName]: _td("Change room name"),
31+
[EventType.RoomCanonicalAlias]: _td("Change main address for the room"),
32+
[EventType.RoomHistoryVisibility]: _td("Change history visibility"),
33+
[EventType.RoomPowerLevels]: _td("Change permissions"),
34+
[EventType.RoomTopic]: _td("Change topic"),
35+
[EventType.RoomTombstone]: _td("Upgrade the room"),
36+
[EventType.RoomEncryption]: _td("Enable room encryption"),
37+
[EventType.RoomServerAcl]: _td("Change server ACLs"),
3638

3739
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
3840
"im.vector.modular.widgets": _td("Modify widgets"),
3941
};
4042

4143
const plEventsToShow = {
4244
// If an event is listed here, it will be shown in the PL settings. Defaults will be calculated.
43-
"m.room.avatar": {isState: true},
44-
"m.room.name": {isState: true},
45-
"m.room.canonical_alias": {isState: true},
46-
"m.room.history_visibility": {isState: true},
47-
"m.room.power_levels": {isState: true},
48-
"m.room.topic": {isState: true},
49-
"m.room.tombstone": {isState: true},
50-
"m.room.encryption": {isState: true},
45+
[EventType.RoomAvatar]: {isState: true},
46+
[EventType.RoomName]: {isState: true},
47+
[EventType.RoomCanonicalAlias]: {isState: true},
48+
[EventType.RoomHistoryVisibility]: {isState: true},
49+
[EventType.RoomPowerLevels]: {isState: true},
50+
[EventType.RoomTopic]: {isState: true},
51+
[EventType.RoomTombstone]: {isState: true},
52+
[EventType.RoomEncryption]: {isState: true},
53+
[EventType.RoomServerAcl]: {isState: true},
5154

5255
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
5356
"im.vector.modular.widgets": {isState: true},

src/i18n/strings/en_EN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@
13601360
"Change topic": "Change topic",
13611361
"Upgrade the room": "Upgrade the room",
13621362
"Enable room encryption": "Enable room encryption",
1363+
"Change server ACLs": "Change server ACLs",
13631364
"Modify widgets": "Modify widgets",
13641365
"Failed to unban": "Failed to unban",
13651366
"Unban": "Unban",

0 commit comments

Comments
 (0)