Skip to content

Commit

Permalink
KEYCLOAK-5474: Unexp behavior with "login w/ email" and "Dup emails" (k…
Browse files Browse the repository at this point in the history
…eycloak#4683)

settings.
  • Loading branch information
ssilvert authored Nov 14, 2017
1 parent eebf0b0 commit 8b023f5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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...');
Expand Down Expand Up @@ -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");
});

Expand Down

0 comments on commit 8b023f5

Please sign in to comment.