Shoot, searching since hours, and think I just found a ways,something like [1]
should do the trick.
I'll update the thread once it works ;)
Thanks
[1]
List<Integer> groupKeys = new ArrayList<Integer>();
for (Membership membership : userTO.getMemberships) { if (""GROUP".equals
(membership.getRightType()) { groupKeys.add(membership.getRightKey()); }
}GroupFiqlSearchConditionBuilder fiql =
SyncopeClient.getGroupSearchConditionBuilder();for (int key : keys) {
fiql.or("key").equalTo(key);}
new AnySearchQuery.Builder().realm(SyncopeConstants.ROOT_REALM)
.fiql(fiql.query())
.build()
De : Adrian Gonzalez <[email protected]>
À : "[email protected]" <[email protected]>
Envoyé le : Vendredi 8 juillet 2016 16h14
Objet : Query : get all groups of a user
Hello,
Sorry, I'm a bit stuck, should be easy, but I don't find.
How can I get all the groups (and their scimid atribute) of a User with a
single call to syncope ?I'm using syncope Client API and have already an
instance of UserTO.
>From what I see, in userTO I have the memberships, but I can't get the group's
>scimid from there.
I'm having a look at
https://github.com/apache/syncope/blob/master/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SearchITCase.java,
but no inspiration.
Thanks,Adrian