|
Home > Archive > WebSphere Portal Server > January 2007 > programmatically retrieving group using PUMA
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
programmatically retrieving group using PUMA
|
|
|
| Hello,
I am using the following code to retrieve the user group.
try{
PumaProfile pp = puma_home.getProfile(request);
PumaLocator pLocator=puma_home.getLocator(request);
User user = (User)pp.getCurrentUser();
java.util.Map attrib_values = pp.getAttributes(user, createAttributes()); List list=pLocator.findGroupsByPrincipal(user,true);
Iterator i1=list.iterator();
while(i1.hasNext())
{
Group group=(Group)i1.next();
java.util.Map groupAttribs=pp. getAttributes(group,createGroupAttribute
s());
String cn=(String)groupAttribs.get((Object)"cn");
System.out.println("CN="+cn);
}
}catch (PumaException pe){
System.out.println("exception in testPumaProfile"+pe.getMessage());
}catch(Exception e)
{
System.out.println("exception"+e.getMessage());
}
public static List createGroupAttributes()
{
List attribs=new ArrayList();
attribs.add("cn");
return attribs;
}
For groups like wpsadmins its working fine but for other groups its giving the following error
xception in testPumaProfilecom.ibm.portal.WpsException: EJPSG0029E: The user uid=bikramjit,o=Default Organization does not have the necessary rights to perform action (PermissionCollection)[8_0_CH [USER_GROUP:401]:NA ActionSet)View, (-1 ) (/ActionSet)](/
PermissionCollection)
Any help?
| |
|
|
|
| Ok friend, but when you announce a resolution you have to share it with the rest of the forum 
| |
|
| I got the same issue and this is the fix:
go to portal admin|access|virtual resources|USER GROUPS, add authenticated users to Users setting, should fix the problem...
|
|
|
|
|