I'm looking for a sling endpoints to get all groups a CQ5 user belongs to.
I first checked into crx but it seems that the groups are not stored in the users nodes. So I've no idea where I should looking at...
you can do:
User currentUser = resourceResolver.adaptTo(User.class); // com.day.cq.security.User
Iterator<Group> currentUserGroups = currentUser.memberOf();
Thanks for your answer but I would like to access to these datas via a webservice (that's why I asked a Sling endpoint) and not via Java.
The Sling Jackrabbit UserManager (http://sling.apache.org/site/managing-users-and-groups-jackrabbitusermanager.html) supports this feature. It is not included OOTB in CRX or CQ, but can be added by installing the bundle. See http://forums.adobe.com/thread/922880 for a discussion about installing this bundle.