on 10-08-2009 12:00 PM
Hi All,
Please let me know a way to find out the current portal role from a web dynpro application. The scenario is like this, lets say I'm having a sample web dynpro application TestApp. Now this application is available under four portal roles Role A, Role B, Role C and Role D. Now whenever the application is being accessed through one of these four roles, I have to fetch the role and show the respective data. I hope this would give you a clear picture of the issue. Looking for some quick response.
Thanks in advance,
Ganpati Jha
Hi,
We can use the following API to get the current role:
IWDNavigationHelperService wdNavHelperService =
(IWDNavigationHelperService) WDPortalUtils.getService(IWDNavigationHelperService.KEY);
String navNode = wdNavHelperService.getCurrentNavNode();
Regards,
Ganpati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can check if current user is member of role.
import the com.sap.security.api
then extract the IUSER
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
then check if is member of role
IRole theGroupcom = UMFactory.getRoleFactory().getRoleByUniqueName(<yours>);
finally
if (user.isMemberOfRole(theGroupcom.getUniqueID(),false)) ecc ecc
Bye.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.