KEYCLOAK-13029 kcadm composite role creation fails

This commit is contained in:
Peter Skopek
2020-04-02 11:58:53 +02:00
committed by Marek Posolda
parent 2e533c4cdb
commit 5f78a09db1
2 changed files with 34 additions and 1 deletions

View File

@@ -442,7 +442,11 @@ public class HttpUtil {
public static String getAttrForType(String rootUrl, String realm, String auth, String resourceEndpoint, String attrName, String attrValue, String returnAttrName) {
String resourceUrl = composeResourceUrl(rootUrl, realm, resourceEndpoint);
resourceUrl = HttpUtil.addQueryParamsToUri(resourceUrl, attrName, attrValue, "first", "0", "max", "2");
if ("roles".equals(resourceEndpoint)) {
resourceUrl = HttpUtil.addQueryParamsToUri(resourceUrl, "search", attrValue, "first", "0", "max", "2");
} else {
resourceUrl = HttpUtil.addQueryParamsToUri(resourceUrl, attrName, attrValue, "first", "0", "max", "2");
}
List<ObjectNode> users = doGetJSON(RoleOperations.LIST_OF_NODES.class, resourceUrl, auth);