Book a Demo

Author Topic: Users logged in to EA  (Read 5894 times)

Knut Paulsen

  • EA User
  • **
  • Posts: 82
  • Karma: +1/-0
    • View Profile
Users logged in to EA
« on: March 23, 2015, 05:19:36 pm »
Hi guys,
When user security is enabled, is there any way to determine if a given user is logged in or not using the API or a database lookup?

Cheers
Knut

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Users logged in to EA
« Reply #1 on: March 23, 2015, 05:25:38 pm »
No. There is nothing saved to the DB when a user logs in (or logs out).

There are a few types of activity that you can detect.
  • Search for when they last added an element or diagram.
  • If auditing is enabled you could also check when they last made a change.
  • Check element discussions for recent comments

Ultimately, though these will only provide a guess. They won't work if the user is only reading the model.

Knut Paulsen

  • EA User
  • **
  • Posts: 82
  • Karma: +1/-0
    • View Profile
Re: Users logged in to EA
« Reply #2 on: March 23, 2015, 05:37:23 pm »
Thanks Simon,
Would have been nice though :-)

cheers
Knut

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Users logged in to EA
« Reply #3 on: March 23, 2015, 06:11:26 pm »
Maybe you can write a trigger in the database? I'm not a DBA. So just a guess.

q.
« Last Edit: March 23, 2015, 06:11:37 pm by qwerty »

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Users logged in to EA
« Reply #4 on: March 24, 2015, 11:41:52 pm »
I don't think that'd work. You could probably spot when someone reads t_secuser.password, which you could assume means that the corresponding user is being logged in -- but there's no corresponding event to signify when the user logs out.

The only alternative I can see is to DIY.

Write an Add-In which responds to EA_FileOpen() by storing suitable session info (a session GUID, the user name from Repository.GetCurrentLoginUser(), host name, Windows user name, date and time, maybe some other stuff) in a custom table, and to EA_FileClose() by clearing it.

Won't be foolproof. RDP / VM sessions is one problem, changing EA user login during a session is another (there's no EA event to tell you when that happens). Also Windows crashes will leave ghost sessions in your table.

But if your requirements aren't too harsh, and it's OK to do some cleanup in the table every now and then, it might be good enough.


/Uffe
My theories are always correct, just apply them to the right reality.

Knut Paulsen

  • EA User
  • **
  • Posts: 82
  • Karma: +1/-0
    • View Profile
Re: Users logged in to EA
« Reply #5 on: March 24, 2015, 11:56:44 pm »
Thanks Uffe, that could be a solution :-)

cheers
Knut