[keycloak-user] KC 3.4.3 Final: Remove group from policy always failed with NPE
Nhut Thai Le
ntle at castortech.com
Tue May 8 09:46:51 EDT 2018
Hello,
I'm using the admin-client to remove a group from group policy but it
always fail with NPE. Here is my code:
GroupRepresentation group =
realm.groups().group(groupUuid).toRepresentation();
String policyUuid = groupPolicies.get(0).getId();
GroupPolicyResource polRes =
client.authorization().policies().group().findById(policyUuid);
GroupPolicyRepresentation policy = polRes.toRepresentation();
policy.removeGroup(group.getPath()); //TODO: not sure why it always fail
here with NPE
polRes.update(policy);
I'm using the test suite as guideline:
https://github.com/pedroigor/keycloak/blob/1e1de85685bb5d5f180f510630cd7133f8a35375/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/client/authorization/GroupPolicyManagementTest.java
Hope to get some help here.
Thai
More information about the keycloak-user
mailing list