Quantcast
Viewing all articles
Browse latest Browse all 542

[ Interactive viewer ] get user name in the launched report

Hello,

I m looking for a method that I can use to get the user that is connected to the interactive viewer in my report. This will enable me to limit access to some data or not regarding to the user profile.

For exemple, my user is connected as the "user1",

How to retrieve "user1" in my report?

I saw things like that but I m not sure that it is really what I need ( and it doesn't work for now anyway, I only get "null" )

function getLoggedInUsername() {
    var myLoginName = null;
    var request = reportContext.getHttpServletRequest();
    if (request!=null) {
        if (request.getRemoteUser()!=null) {
            myLoginName = request.getRemoteUser();
        }
    }
    return myLoginName;
}


Thanks in advance.

Regards,

Viewing all articles
Browse latest Browse all 542

Trending Articles