KEYCLOAK-5474: Unexp behavior with "login w/ email" and "Dup emails" (#4683)

settings.
This commit is contained in:
Stan Silvert 2017-11-14 16:12:56 -05:00 committed by GitHub
parent eebf0b0499
commit 8b023f57f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -352,7 +352,7 @@ function genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $l
$scope.changed = true;
}
}, true);
$scope.save = function() {
var realmCopy = angular.copy($scope.realm);
console.log('updating realm...');
@ -391,6 +391,13 @@ module.controller('DefenseHeadersCtrl', function($scope, Current, Realm, realm,
});
module.controller('RealmLoginSettingsCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $location, Dialog, Notifications) {
// KEYCLOAK-5474: Make sure duplicateEmailsAllowed is disabled if loginWithEmailAllowed
$scope.$watch('realm.loginWithEmailAllowed', function() {
if ($scope.realm.loginWithEmailAllowed) {
$scope.realm.duplicateEmailsAllowed = false;
}
});
genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $location, Dialog, Notifications, "/realms/" + realm.realm + "/login-settings");
});