on 03-28-2007 7:42 AM
Hi Experts ,
I have a scenario similar to the one in following weblog:
/people/preksha.malhotra/blog/2006/12/12/accessing-a-web-dynpro-application-through-portal-using-portal-user-id
I need to know, if I can get the Portal "Role" of the user who has
looged in on the portal and then pass it as the application parameter
to the Web Dynpro application.
Also, if there is any other way to get the Portal Role of the user
in Web Dynpro, if EP and Web Dynpro are on different servers.
For the same server situation i have tried the following code which works:
Iterator rit = null;
IWDClientUser clientUser = WDClientUser.getCurrentUser();
IUser user = clientUser.getSAPUser();
rit = user.getRoles(true);
IRoleFactory rfact = UMFactory.getRoleFactory();
while (rit.hasNext()) {
String roleName = (String) rit.next();
IRole role = rfact.getRole(roleName);
wdContext.currentContextElement().setRole(role);
}
Any help would be appreciated.
Thanx in Advance
Alka.
Hi,
role = rfact.getRole(roleName);
wdComponentAPI.getMessageManager().reportSuccess("Role:" + roleName
+ "Display Name:" + role.getDisplayName()
+ "ID: " + role.getUniqueID()
+ "Uniquename: " + role.getUniqueName()
+ "Description: " + role.getDescription());
<b>role.getDisplayName()</b> will gives you the Role Name.
Regards,
Jhansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alka,
sitting in front of the same problem here as you are facing. I have WD and portal on seperate servers and want to look for specific roles a user has (or not).
Did you find a solution? Or do you know if it is possible at all? I could imagine that the UMFactory is just looking at the server the WD is deployed to and not the portal server where it is displayed. The user is passed via SSO but the roles most probably not... (i guess?).
You could make my day if you have a solution though... ;).
Thanks,
Christian
Hi Christian,
I have yet not found the solution for getting the Portal Roles of the looged in user.
Going through the various forums, and the solutions proposed, I finally deployed
my Web Dynpro application on the Portal server and made it work.
Please notify me in case you find a solution for this.
Regards,
Alka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhijeet,
You have misunderstood the problem. I don't require all the roles that are defined
on the Protal Server.
I need the Role of the User who has logged in on the Portal server.
Also the solution that You are trying to suggest will work only on same server scenario.
Anyways thanx for a prompt reply.
Alka.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.