remove multiple onReady

This commit is contained in:
Girish Ramakrishnan
2022-01-13 07:47:34 -08:00
parent 82f6359547
commit e0b6ce9bd8

View File

@@ -1073,12 +1073,13 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
});
}
Client.onReady(refresh);
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) loadExternalLdapConfig(); });
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) $scope.directoryConfig.refresh(); });
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) $scope.userDirectoryConfig.refresh(); });
Client.onReady(refreshAllUsers);
Client.onReady(function () {
refresh();
if ($scope.user.isAtLeastAdmin) loadExternalLdapConfig();
if ($scope.user.isAtLeastAdmin) $scope.directoryConfig.refresh();
if ($scope.user.isAtLeastAdmin) $scope.userDirectoryConfig.refresh();
refreshAllUsers();
// Order matters for permissions used in canEdit
$scope.roles = [
{ id: 'user', name: $translate.instant('users.role.user'), disabled: false },