Merge pull request #3351 from matrix-org/t3chguy/pl_control_e2e
Expose power level toggle for enabling e2ee to room settings
This commit is contained in:
commit
de0719151f
2 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,7 @@ const plEventsToLabels = {
|
|||
"m.room.power_levels": _td("Change permissions"),
|
||||
"m.room.topic": _td("Change topic"),
|
||||
"m.room.tombstone": _td("Upgrade the room"),
|
||||
"m.room.encryption": _td("Enable room encryption"),
|
||||
|
||||
"im.vector.modular.widgets": _td("Modify widgets"),
|
||||
};
|
||||
|
@ -44,6 +45,7 @@ const plEventsToShow = {
|
|||
"m.room.power_levels": {isState: true},
|
||||
"m.room.topic": {isState: true},
|
||||
"m.room.tombstone": {isState: true},
|
||||
"m.room.encryption": {isState: true},
|
||||
|
||||
"im.vector.modular.widgets": {isState: true},
|
||||
};
|
||||
|
@ -304,6 +306,11 @@ export default class RolesRoomSettingsTab extends React.Component {
|
|||
</div>;
|
||||
});
|
||||
|
||||
// hide the power level selector for enabling E2EE if it the room is already encrypted
|
||||
if (client.isRoomEncrypted(this.props.roomId)) {
|
||||
delete eventsLevels["m.room.encryption"];
|
||||
}
|
||||
|
||||
const eventPowerSelectors = Object.keys(eventsLevels).map((eventType, i) => {
|
||||
let label = plEventsToLabels[eventType];
|
||||
if (label) {
|
||||
|
|
|
@ -681,6 +681,7 @@
|
|||
"Change permissions": "Change permissions",
|
||||
"Change topic": "Change topic",
|
||||
"Upgrade the room": "Upgrade the room",
|
||||
"Enable room encryption": "Enable room encryption",
|
||||
"Modify widgets": "Modify widgets",
|
||||
"Failed to unban": "Failed to unban",
|
||||
"Unban": "Unban",
|
||||
|
|
Loading…
Reference in a new issue