programmatically retrieving group using PUMA - Websphere

This is a discussion on programmatically retrieving group using PUMA - Websphere ; 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,createGroupAtt ributes()); String ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: programmatically retrieving group using PUMA

  1. 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,createGroupAtt ributes());

    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]:NAActionSet)View, (-1 ) (/ActionSet)](/PermissionCollection)
    Any help?

  2. Re: programmatically retrieving group using PUMA

    I have resolved it!!!!!.

  3. Re: programmatically retrieving group using PUMA

    Ok friend, but when you announce a resolution you have to share it with the rest of the forum



  4. Re: programmatically retrieving group using PUMA

    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...

+ Reply to Thread