on 10-07-2009 8:15 AM
Hi Friends,
I got some code related to security that we need to take care from webdynpro side in case of extranet portal application.
String userId = "";
IWDClientUser wdUser = null;
IUser user = null;
IUserAccount
[] acct = null;
try {
wdUser = WDClientUser.getCurrentUser();
user = wdUser.getSAPUser();
if (user != null) {
acct = user.getUserAccounts();
userId = acct[0].getLogonUid();
if (userId != null) {
//wdContext.currentContextElement().setCustno(strUserID);
//set the current customer to LoggedInUser
wdThis.wdGetContext().currentContextElement().setCurrentCustomer(userId.toUpperCase());
return userId.toUpperCase();
} else {
wdComponentAPI.getMessageManager().reportWarning(" Invalid user1");
}
} else {
wdComponentAPI.getMessageManager().reportWarning(" Invalid user2");
}
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportWarning(" Invalid user3" + e.getMessage());
}
return "";
Is this code really checking the logged in user with the R/3?
Regards,
Lakshmi Prasad.
Hi,
The code just sets the name of the logged in user to a context variable.
Thanks,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.