diff --git a/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/KeycloakUserGroupManager.java b/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/KeycloakUserGroupManager.java index 4eccb027162..50cc3157b8f 100644 --- a/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/KeycloakUserGroupManager.java +++ b/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/KeycloakUserGroupManager.java @@ -74,7 +74,7 @@ public List getGroups() { @Override public List getUsers() { return keycloakClient - .getAllUsers(keycloakClient.countAllUsers()) + .getAllUsers(keycloakClient.countAllUsers(), true) .stream() .map(KeycloakUser::getUsername) .collect(Collectors.toList()); diff --git a/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/client/KeycloakClient.java b/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/client/KeycloakClient.java index 53177d1b5bc..841a1a8e3f0 100644 --- a/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/client/KeycloakClient.java +++ b/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/main/java/org/activiti/cloud/services/identity/keycloak/client/KeycloakClient.java @@ -202,7 +202,10 @@ List getUsersByGroupId( @RequestMapping(method = RequestMethod.GET, value = "/users") @Headers("Content-Type: application/json") - List getAllUsers(@RequestParam(name = "max", required = false, defaultValue = "100") Integer max); + List getAllUsers( + @RequestParam(name = "max", required = false, defaultValue = "100") Integer max, + @RequestParam(name = "briefRepresentation", required = false, defaultValue = "true") boolean briefRepresentation + ); @RequestMapping(method = RequestMethod.GET, value = "/users/count") @Headers("Content-Type: application/json") diff --git a/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/test/java/org/activiti/cloud/services/identity/keycloak/KeycloakClientIT.java b/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/test/java/org/activiti/cloud/services/identity/keycloak/KeycloakClientIT.java index 50e08cb6c91..c3057620287 100644 --- a/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/test/java/org/activiti/cloud/services/identity/keycloak/KeycloakClientIT.java +++ b/activiti-cloud-service-common/activiti-cloud-services-common-identity-keycloak/src/test/java/org/activiti/cloud/services/identity/keycloak/KeycloakClientIT.java @@ -486,7 +486,7 @@ public void should_getGroup_By_Path() { @Test public void should_getUsers() { Integer countAllUsers = keycloakClient.countAllUsers(); - List allUsers = keycloakClient.getAllUsers(countAllUsers); + List allUsers = keycloakClient.getAllUsers(countAllUsers, true); assertThat(allUsers).hasSizeGreaterThan(0);