Returning a full representation when querying organizations
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
parent
2b0392a3e8
commit
e3c0b918bd
1 changed files with 2 additions and 8 deletions
|
@ -49,6 +49,7 @@ import org.keycloak.models.UserModel;
|
|||
|
||||
import org.keycloak.models.utils.ModelToRepresentation;
|
||||
import org.keycloak.organization.OrganizationProvider;
|
||||
import org.keycloak.organization.utils.Organizations;
|
||||
import org.keycloak.representations.idm.MemberRepresentation;
|
||||
import org.keycloak.representations.idm.MembershipType;
|
||||
import org.keycloak.representations.idm.OrganizationRepresentation;
|
||||
|
@ -192,14 +193,7 @@ public class OrganizationMemberResource {
|
|||
|
||||
UserModel member = getUser(id);
|
||||
|
||||
return provider.getByMember(member).map((org) -> {
|
||||
OrganizationRepresentation organization = new OrganizationRepresentation();
|
||||
|
||||
organization.setId(org.getId());
|
||||
organization.setName(org.getName());
|
||||
|
||||
return organization;
|
||||
});
|
||||
return provider.getByMember(member).map(Organizations::toRepresentation);
|
||||
}
|
||||
|
||||
@Path("count")
|
||||
|
|
Loading…
Reference in a new issue