Hi,
I need to return the CURRENT_USER in an XSA HDI container. The catch is, I need to be able to return this in a UI5 application where site-app-server is used for the fiori launchpad.
All of the information I have seen online works for the approuter scenario, but in the case of the site-app-server only the technical user is ever returned.
Is there another technique that can be used in my scenario? or is this a defect with XSA, site-app-server and the portal service?
I have put together three mta's containing the the demo apps to reproduce the error. Both of the UI5 applications are identical, except for the approuter vs site-app-server configuration. These are available and hosted on github:
approuter example (working correctly)
https://github.com/bigsmity/XSACurrentUserDefectWithAppRouter
site-app-server and fiori launchpad (only returning the technical user)
https://github.com/bigsmity/XSACurrentUserDefectLaunchpad
https://github.com/bigsmity/XSACurrentUserDefectWithSiteAppServer
I have created the following view to display the CURRENT_USER with various techniques:
VIEW "views::USER_INFO"
AS
SELECT
SESSION_CONTEXT('APPLICATION') "APPL",
SESSION_CONTEXT('APPLICATIONUSER') "APPLUSER",
SESSION_CONTEXT('XS_APPLICATIONUSER') "XS_APPUSER",
SESSION_CONTEXT('XS_USER_NAME') "XS_USERNAME"
FROM "DUMMY";
Results
site-app-server:

approuter:

This returns the correct details when run from the hdi in webide from both applications. The error occurs when the site-app-server application is deployed (obviously since it cannot be run in the workspace context).

Any and all help is appreciated!
Thanks,
Bradley.