Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
I tried searching a bit on the forums but could not find anything relevant.:o I want to get a list of MWS groups that a user belongs to. Similarly for Roles. Is there an API function that can do it? I could see that I can get the user name by using getFacesContext().getExternalContext().getRemoteUser();
You can use the following: UserModel user = new UserModel(); List groups = user.getGroupMembership(); Iterator it = groups.iterator(); String group = null; while (it.hasNext()) { group = ((GroupModel)it.next()).getPrincipalID(); … } For roles, use user.getRoleMembership(); Hope this help
very helpful. Many thanks !