on 06-13-2008 7:23 AM
Hi..
I need to display the roles, worksets, pages and iviews that are assigned to a particular portal user using WebDynpro.
I tried to search in SDN and found a few blogs on this... but all are for DynPages. I could not find any inputs on how to achieve this in Webdynpro.
I am listing down the blogs for your reference :
1) /people/prakash.singh4/blog/2005/07/28/browse-roles-folders-pages-iviews-assigned-to-a-user-ep6-sp9-and-higher
2) /people/prakash.singh4/blog/2005/09/06/create-a-sitemap-for-your-portal
Please provide me your suggestions on how to display the roles, worksets, pages and iviews that are assigned to a particular portal user using WebDynpro.
Thanks and Regards,
Sayan Ghosh
Hi Vaibhav,
Thanks for the quick response. The method u said will fetch me the roles only. But how to fetch the assigned worksets and iviews along with that.. ?
Thanks and Regards,
Sayan Ghosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
Thanks for your quick response. The links and code that u specified are not related to webDynpro. I want a sample Webdynpro code to solve my requirement.
Thanks and Regards,
Sayan Ghosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please use following code to get all roles assigned to user:
IWDClientUser wdUser = WDClientUser.forceLoggedInClientUser();
IUser user = wdUser.getSAPUser();
String strRoleID = "", strRoleDesc = "";
IRoleFactory iRoleFactory;
iRoleFactory = UMFactory.getRoleFactory();
// Get All the Roles of the User
Iterator iteratorRoles = user.getRoles(true);//prtRequest.getUser().getRoles(true);
// Loop through all the Roles
while(iteratorRoles.hasNext())
{
strRoleID = iteratorRoles.next().toString();
try
{
strRoleDesc = iRoleFactory.getRole(strRoleID).getDescription();
wdComponentAPI.getMessageManager().reportSuccess("Role: "+strRoleDesc);
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException("Exception e: "+e, false);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.