[keycloak-user] KC 3.4.3 Final: Remove group from policy always failed with NPE

Pedro Igor Silva psilva at redhat.com
Tue May 8 11:56:23 EDT 2018


Hi,

Could you open a JIRA and attach the stacktrace, please ? Once you do that,
I'll check what is happening.

Regards.
Pedro Igor

On Tue, May 8, 2018 at 10:46 AM, Nhut Thai Le <ntle at castortech.com> wrote:

> 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/1e1de85685bb5d5f180f510630cd71
> 33f8a35375/testsuite/integration-arquillian/tests/base/src/test/java/org/
> keycloak/testsuite/admin/client/authorization/
> GroupPolicyManagementTest.java
>
> Hope to get some help here.
>
> Thai
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


More information about the keycloak-user mailing list