01-10-07 12:28 AM
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 t
he 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 Ac
tionSet)View, (-1 ) (/ActionSet)](/
PermissionCollection)
Any help?
[ Post a follow-up to this message ]
|