cancel
Showing results for 
Search instead for 
Did you mean: 

extracting User Group Info

cszamudio
Champ on-the-rise
Champ on-the-rise
Hi,
I've been struggling to figure out how to extract the UserGroups that a User belongs to using web services.  Does anyone have any suggestions for which Web services might be useful in this regard?

Thanks,
Carlos S. Zamudio
2 REPLIES 2

madhurao
Champ in-the-making
Champ in-the-making
I guess the following code will help you,

AuthorityFilter filter = new AuthorityFilter("GROUP", false);
String[] group = accessControlService.getAllAuthorities(filter);
          
for (int i = 0; i < group.length; i++) {
   System.out.println("result : " + group);
   SiblingAuthorityFilter filter1 = new SiblingAuthorityFilter("USER", false);
   String[] users = accessControlService.getChildAuthorities(group, filter1);
   if(users != null)
   for (int j = 0; j < users.length; j++)
      System.out.println("users : " + users[j]);
}

Regards,
Madhu

cszamudio
Champ on-the-rise
Champ on-the-rise
Thank you Madhu. This is exactly the help and hint that I needed to explore the Access Control package.
Cheers,
Carlos S. Zamudio