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?

@cbunge Any help?

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.

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