Add .well-known config option to force disable encryption on room creation (#11120)
* force disable encryption on room creation * test allowChangingEncryption * move into utils/room directory * tests * unit test CreateRoomDialog * remove debug * wait for constructor promises to settle * test case for force_disable * comment * set forced value after resolving checkUserIsAllowedToChangeEncryption * tidy and comments * use label text in test
This commit is contained in:
parent
9d9c55d92e
commit
a692fe2181
9 changed files with 375 additions and 9 deletions
|
@ -16,9 +16,13 @@ limitations under the License.
|
|||
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { shouldForceDisableEncryption } from "./room/shouldForceDisableEncryption";
|
||||
import { getE2EEWellKnown } from "./WellKnownUtils";
|
||||
|
||||
export function privateShouldBeEncrypted(client: MatrixClient): boolean {
|
||||
if (shouldForceDisableEncryption(client)) {
|
||||
return false;
|
||||
}
|
||||
const e2eeWellKnown = getE2EEWellKnown(client);
|
||||
if (e2eeWellKnown) {
|
||||
const defaultDisabled = e2eeWellKnown["default"] === false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue