Add a flag to control whether cross-signing signatures are trusted

Fixes: https://github.com/vector-im/riot-web/issues/12616
This commit is contained in:
David Baker 2020-03-25 18:38:12 +00:00
parent b7013c6f5d
commit 25e7bde7bc
6 changed files with 27 additions and 0 deletions

View file

@ -16,6 +16,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import {MatrixClient} from 'matrix-js-sdk';
import {_td} from '../languageHandler';
import {
AudioNotificationsEnabledController,
@ -24,6 +26,7 @@ import {
} from "./controllers/NotificationControllers";
import CustomStatusController from "./controllers/CustomStatusController";
import ThemeController from './controllers/ThemeController';
import PushToMatrixClientController from './controllers/PushToMatrixClientController';
import ReloadOnChangeController from "./controllers/ReloadOnChangeController";
import {RIGHT_PANEL_PHASES} from "../stores/RightPanelStorePhases";
@ -525,4 +528,12 @@ export const SETTINGS = {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
default: true,
},
"e2ee.manuallyVerifyAllSessions": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
displayName: _td("Manually verify all remote sessions"),
default: false,
controller: new PushToMatrixClientController(
MatrixClient.prototype.setCryptoTrustCrossSignedDevices, true,
),
},
};