Fix add user button state

This commit is contained in:
Johannes Zellner
2020-02-27 15:10:56 +01:00
parent 3c3370b929
commit 2d2989a425

View File

@@ -71,6 +71,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.userremove.userInfo = {};
refresh();
refreshAllUsers();
$('#userRemoveModal').modal('hide');
});
@@ -167,6 +168,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
if (error) return console.error(error);
refresh();
refreshAllUsers();
$('#userAddModal').modal('hide');
});
@@ -667,9 +669,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
refreshUsers();
};
Client.onReady(refresh);
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) loadExternalLdapConfig(); });
Client.onReady(function () {
function refreshAllUsers() {
Client.getUsers(function (error, results) {
if (error) return console.error(error);
@@ -680,7 +680,11 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.allUsersById[results[i].id] = results[i];
}
});
});
}
Client.onReady(refresh);
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) loadExternalLdapConfig(); });
Client.onReady(refreshAllUsers);
Client.onReady(function () {
// Update available roles depending on features
if ($scope.config.features.userMaxCount === null) {