HPE Morpheus Enterprise
1832350 Members
2636 Online
110041 Solutions
New Discussion

How to find out the login user information for custom reports

 
rajmartha
Regular Advisor

How to find out the login user information for custom reports

Hi All

i am working on creating a custom eport plugin which require a login user information,. with this login user information i need to filter some data, how can i find the login user information ?

for example: User “A” loged in and ran a report, this report is based on a group fliter… if this user does not have access to Group, X and Group Y, that report should give the results without the Group X and Y information.

if i know where to see if User “A” is the one logged then i can write another Query to find what groups he have access to…

Any idea which table we can see if User “A” is logged in or the logged in user name?

3 REPLIES 3
rajmartha
Regular Advisor

Re: How to find out the login user information for custom reports

@cbunge Any help?

rajmartha
Regular Advisor

Re: How to find out the login user information for custom reports

i see a getOwnerOnly function in Morpheus Documentation, Do you know how can i get a logged in user useranme using this function?

Boolean getOwnerOnly() {
return false
}

https://developer.morpheusdata.com/api/com/morpheusdata/model/ReportType.html#ownerOnly

Ollie-Phillips
Valued Contributor

Re: How to find out the login user information for custom reports

Hi, you will probably need to query the audit_log table and make a comparison by user looking at event_type column for login#process and logout#index event type values.

Any user that does not have logout#index event in the log, which is time stamped later than the most recent login#process event, is still logged in.