Add ability to trigger external ldap syncer task
This commit is contained in:
@@ -402,6 +402,7 @@
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
This option allows to use an external LDAP or ActiveDirectory service for user management.
|
||||
<button class="btn btn-primary pull-right" ng-show="externalLdap.enabled" ng-click="externalLdap.sync()"><i class="fa fa-circle-notch fa-spin" ng-show="externalLdap.syncBusy"></i> Synchronize users</button>
|
||||
</p>
|
||||
|
||||
<div class="checkbox">
|
||||
|
||||
@@ -417,6 +417,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
busy: false,
|
||||
error: {},
|
||||
success: false,
|
||||
syncBusy: false,
|
||||
|
||||
// fields
|
||||
enabled: false,
|
||||
@@ -426,6 +427,18 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
bindDn: '',
|
||||
bindPassword: '',
|
||||
|
||||
sync: function () {
|
||||
$scope.externalLdap.syncBusy = true;
|
||||
Client.startExternalLdapSync(function (error, result) {
|
||||
if (error) {
|
||||
$scope.externalLdap.syncBusy = false;
|
||||
console.error('Unable to start ldap syncer task.', error);
|
||||
} else {
|
||||
console.log(result);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.externalLdap.busy = true;
|
||||
$scope.externalLdap.error = {};
|
||||
|
||||
Reference in New Issue
Block a user