lib/config, gui: Disallow some options in combination with "untrusted" (fixes #8920) (#8921)

This prevents combining untrusted with introducer and auto-accept, and
also verifies that folders shared with untrusted devices have passwords
at config loading time.

Co-authored-by: Simon Frei <freisim93@gmail.com>
This commit is contained in:
Jakob Borg
2023-06-14 09:24:31 +02:00
committed by GitHub
co-authored by Simon Frei
parent 7d56fba321
commit 6b475bdb78
8 changed files with 143 additions and 16 deletions
@@ -1709,6 +1709,13 @@ angular.module('syncthing.core')
return $scope.currentDevice._editing == 'new';
}
$scope.editDeviceUntrustedChanged = function () {
if (currentDevice.untrusted) {
currentDevice.introducer = false;
currentDevice.autoAcceptFolders = false;
}
}
$scope.editDeviceExisting = function (deviceCfg) {
$scope.currentDevice = $.extend({}, deviceCfg);
$scope.currentDevice._editing = "existing";