on 11-11-2014 3:07 PM
Hi all,
I have solved this problem before with the below code:
Code: |
---|
var username = ''; jQuery.ajax({ url: "/sap/hana/xs/ide/editor/server/dbinfo.xsjs", type: 'GET', dataType: "json", async:false, success: function(data, s, xhr) { if (xhr.getResponseHeader("x-sap-login-page")) { return; } if (data) { username = data.user; } }, }); |
But after that I created a new user which haven't got editor privilage so that this code become useless.
Can anybody help me about taking username from session and showing it on shell?
NOTE: I'm using sap.ui.ux3.Shell.
Hi Kemal,
SELECT SESSION_USER "session user" FROM DUMMY;
The above statement would give the session_user from HANA side. May be you can consume the output?
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Sorry for late response.
I tried the code that you gave me but it is returning 'SYSTEM' user.
I mean the username which i wrote in below screen.
Is it because I'm logging in as an anonymous user and that user is 'SYSTEM' user? How can i solve this problem?
.xsaccess |
---|
{ "exposed" : true, "authentication" :{ "method": "Form" } } |
Thanks.
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.