Merge pull request #588 from mposolda/master

Adding property to configure if userAccountControls should be updated in...
This commit is contained in:
Marek Posolda 2014-08-04 21:35:02 +02:00
commit 982ba5ab90
3 changed files with 20 additions and 0 deletions

View file

@ -445,8 +445,11 @@ module.controller('LDAPCtrl', function($scope, $location, Notifications, Dialog,
$scope.instance.config = {}; $scope.instance.config = {};
$scope.instance.priority = 0; $scope.instance.priority = 0;
$scope.syncRegistrations = false; $scope.syncRegistrations = false;
$scope.userAccountControlsAfterPasswordUpdate = true;
$scope.instance.config.userAccountControlsAfterPasswordUpdate = true;
} else { } else {
$scope.syncRegistrations = instance.config.syncRegistrations && instance.config.syncRegistrations == "true"; $scope.syncRegistrations = instance.config.syncRegistrations && instance.config.syncRegistrations == "true";
$scope.userAccountControlsAfterPasswordUpdate = instance.config.userAccountControlsAfterPasswordUpdate && instance.config.userAccountControlsAfterPasswordUpdate == "true";
} }
$scope.ldapVendors = [ $scope.ldapVendors = [
@ -474,6 +477,14 @@ module.controller('LDAPCtrl', function($scope, $location, Notifications, Dialog,
} }
}) })
$scope.$watch('userAccountControlsAfterPasswordUpdate', function() {
if ($scope.userAccountControlsAfterPasswordUpdate) {
$scope.instance.config.userAccountControlsAfterPasswordUpdate = "true";
} else {
$scope.instance.config.userAccountControlsAfterPasswordUpdate = "false";
}
})
$scope.$watch('instance', function() { $scope.$watch('instance', function() {
if (!angular.equals($scope.instance, instance)) { if (!angular.equals($scope.instance, instance)) {
$scope.changed = true; $scope.changed = true;

View file

@ -116,6 +116,12 @@
<a class="btn btn-primary" data-ng-click="testAuthentication()">Test authentication</a> <a class="btn btn-primary" data-ng-click="testAuthentication()">Test authentication</a>
</div> </div>
</div> </div>
<div class="form-group clearfix" data-ng-show="instance.config.vendor === 'ad' ">
<label class="col-sm-2 control-label" for="userAccountControlsAfterPasswordUpdate">Enable Account After Password Update</label>
<div class="col-sm-4">
<input ng-model="userAccountControlsAfterPasswordUpdate" name="userAccountControlsAfterPasswordUpdate" id="userAccountControlsAfterPasswordUpdate" onoffswitch />
</div>
</div>
</fieldset> </fieldset>
<div class="pull-right form-actions" data-ng-show="create && access.manageUsers"> <div class="pull-right form-actions" data-ng-show="create && access.manageUsers">

View file

@ -26,6 +26,9 @@ public class KeycloakEventBridge implements EventBridge {
public KeycloakEventBridge(boolean updateUserAccountAfterPasswordUpdate) { public KeycloakEventBridge(boolean updateUserAccountAfterPasswordUpdate) {
this.updateUserAccountAfterPasswordUpdate = updateUserAccountAfterPasswordUpdate; this.updateUserAccountAfterPasswordUpdate = updateUserAccountAfterPasswordUpdate;
if (updateUserAccountAfterPasswordUpdate) {
logger.info("userAccountControl attribute will be updated in Active Directory after user registration");
}
} }
@Override @Override