From a423c38e42c171806e5e94fbb9487ed4cd19af4c Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 6 Dec 2013 19:08:50 +0000 Subject: [PATCH] KEYCLOAK-214 view all users in a realm through admin console --- .../resources/admin/js/controllers/users.js | 15 ++++++++------- .../resources/admin/partials/user-list.html | 4 ++-- .../java/org/keycloak/models/RealmModel.java | 2 ++ .../org/keycloak/models/jpa/RealmAdapter.java | 9 +++++++++ .../models/picketlink/RealmAdapter.java | 19 ++++++++++++------- .../resources/admin/UsersResource.java | 19 +++++++++++-------- 6 files changed, 44 insertions(+), 24 deletions(-) diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js index de73f6333a..f2c6b7c1fc 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js @@ -120,15 +120,16 @@ module.controller('UserListCtrl', function($scope, realm, User) { $scope.realm = realm; $scope.searchQuery = function() { $scope.searchLoaded = false; + $scope.currentSearch = $scope.search; + + var params = { realm: realm.id }; if ($scope.search) { - $scope.currentSearch = $scope.search; - $scope.users = User.query({ realm: realm.id, search : $scope.search }, function() { - $scope.searchLoaded = true; - }); - } else { - $scope.currentSearch = null; - $scope.users = null; + params.search = $scope.search; } + + $scope.users = User.query(params, function() { + $scope.searchLoaded = true; + }); }; }); diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html index c79b243125..b29f3ebcc3 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/user-list.html @@ -14,7 +14,7 @@

{{realm.realm}} Users

- +
@@ -66,7 +66,7 @@ -