Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

How can I take username from session and show it at the headerItem on HANA SHELL

$
0
0

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.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>