Add ability to trigger external ldap syncer task

This commit is contained in:
Johannes Zellner
2019-08-29 17:22:39 +02:00
parent 8c44e558a8
commit 426d2aab09
3 changed files with 23 additions and 0 deletions
+1
View File
@@ -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">
+13
View File
@@ -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 = {};