Add subgroup count to groupByPath (#33161)

Closes #31410

Signed-off-by: Keshav Deshpande <keshavprashantdeshpande@gmail.com>
This commit is contained in:
keshavprashantdeshpande 2024-09-23 08:28:06 +02:00 committed by GitHub
parent ba58110ed2
commit 402aa42201
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,6 +116,7 @@ import org.keycloak.services.resources.admin.permissions.AdminPermissions;
import org.keycloak.storage.DatastoreProvider;
import org.keycloak.storage.ExportImportManager;
import org.keycloak.storage.StoreSyncEvent;
import org.keycloak.utils.GroupUtils;
import org.keycloak.utils.ProfileHelper;
import org.keycloak.utils.ReservedCharValidator;
@ -1093,7 +1094,8 @@ public class RealmAdminResource {
}
auth.groups().requireView(found);
return ModelToRepresentation.toRepresentation(found, true);
GroupRepresentation groupRep = ModelToRepresentation.toRepresentation(found, true);
return GroupUtils.populateSubGroupCount(found, groupRep);
}
/**