on 08-11-2009 4:54 PM
Hi,
I developed a webdynpro app without setting any permission parameters. When I run it direct from my studio first an logon screen appears. When I logged on and write some data into the database the user there is identical with the user I entered in the logon screen.
When I integrate the app into the "portal" (it's an ce7.11), the user in the database fields is always guest and not the user logged on to the portal.
How can I change this? I want the user who is logged on to the portal as the user written to the database.
Thanks ahead.
Hi,
Set the webdynpro application parameter authentication to true and try.when writing data in to table are you retreiving the logged user from portal and sending to backend or how you are doing this?can you post the code used to send the data to database.
Thanks,
pkv
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
There is another way also in webdydnpro.1st store the portal user name in a variable and send that variable value to data base.Write the below code in WdDoInit() method:
try{
// get the currently logged in user
IWDClientUser wdUser = WDClientUser.getCurrentUser();
// get the com.sap.security.api.Iuser; It is null in case wdUser represents an anonymous user
IUser user = wdUser.getSAPUser();
// check whether the user is anonymous
if (user != null)
{
// access logon ID by iterating through the IUserAccount array
IUserAccount[] acct = user.getUserAccounts();
if(acct[0] != null)
{
String strUserid = acct[0].getLogonUid();
// strUserid now contains the User name.Pass the value obtained from the portal to backend
}
}
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException("Unable to get the Details. Please check the server logs. " ,true);
e.printStackTrace();
}
Thanks
Susmita
The crux seems to be the caf application. There are no (not yet) permission checks enabled. When I run the webdynpro application which uses the caf through a webservice, no access to the database is possible.
But when I first run "test service" (and log on in the appearing logon screen) out from my developer studio the webdynpro application in the same browser instance is able to access the data.
So it seems, that the portal logon is not the same logon as when I run "test service" out of the developer studio.
So I have to pass the portal logon to the CAF logon. Is this right and how is this possible?
Thanks ahead.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.