Skip to Content

Searching and displaying Roles for a user


I want to access roles, worksets, iviews for logged on user.

I am using following piece of code which gives me ALL roles and other PCD contents in portal.

IUser iUser = WDClientUser.getCurrentUser().getSAPUser();
Hashtable env = new Hashtable();
env.put(IPcdContext.SECURITY_PRINCIPAL, iUser);
env.put(, PcmConstants.ASPECT_SEMANTICS);
InitialContext ctx = null;
DirContext dirCtx;
ctx = new InitialContext(env);
dirCtx = (DirContext) ctx.lookup("pcd:portal_content/");
PcdSearchControls pcdSearchControls = new PcdSearchControls();

NamingEnumeration ne ="","(",pcdSearchControls);

Any idea how can I get details of the roles for specific user (in this case, logged on user)?

Thanks and regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 28, 2010 at 09:08 AM

    hi amey,

    check this thread

    fetch PCD and UME roles and worksets

    hope you solve your issue



    ( Little bit search helps you more rather than posting the same type of Questions)

    Edited by: maheshchandra.lanco on Jun 28, 2010 11:11 AM

    Add comment
    10|10000 characters needed characters exceeded