on 2019 Apr 09 12:29 AM
Hi!
I am working with Views in SAP HANA Express Edition.
This is the view code. It has the current user in the output.
I developed a SAPUI5 application that uses xsuaa for authentication, but when exposing the view with XSOData, the user is not the logged one (I logged in with XSA_DEV user). It is a technical user instead.
All the sctructured privileges in my application are not working because the user is not the logged one.
Any idea what could be missing here? I need to identify the current user when using xsodata
Thanks
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Current_user is going to be the HDI Container technical user. If you want the business user you need to select the applicationuser from the session context: https://github.com/SAP/hana-xsa-opensap-hana7/blob/master/xsjs/lib/xsjs/whoAmI.xsjs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Thomas! Always saving the day!
Having always the HDI Container technical user as the user that access the database means that for example if I define a Structured Privilege, that privilege will be used always with all application users (for example through XSOData) ?? or is there a way to assign Structured Privileges to certain application users?
Thanks!
The application users are not DB users so you can't assign a DB privilege to them. You always assign that to the HDI technical container. It will be checked for all DB access via that container. However you can filter using attributes assigned to the business users in the XSUAA/External IDP.
User | Count |
---|---|
42 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.