[Archivesspace_Users_Group] logged in admin users?

Chris Fitzpatrick Chris.Fitzpatrick at lyrasis.org
Mon Jul 13 17:48:37 EDT 2015


Hi Steve,

Trying to think off the top of my head for a solution...

You could look at the session table in the database to see what sessions are still active.

Or you could tail the log and see if the anything is hitting the /update_monitor with a post request. Like this:
D, [2015-07-13T16:46:44.536000 #1057] DEBUG -- : Thread-6772: POST /update_monitor [session: #<Session:0x5f7c42bf @store={:user=>"staff_system", :login_time=>2015-07-13 16:44:14 -0500, :expirable=>false}, @id="ff50b6d8d6abe7694eed4866159c000dc84d67fd6f1016e538852d0bb8b4eb69">]
D, [2015-07-13T16:46:44.540000 #1057] DEBUG -- : Thread-6772: Post-processed params: {:active_edits=>#<JSONModel(:active_edits) {"jsonmodel_type"=>"active_edits", "active_edits"=>[{"uri"=>"/repositories/2/resources/2", "user"=>"admin", "time"=>"2015-07-13T16:46:43-05:00"}]}>}


 That's a user's (in this case "admin")  browser sending an  AJAX  request to check if anyone else if editing the record. 

If someone has a browser window open and their session is expired, you'll be seeing a 401 error there...

b,chris. 

Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/

________________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Steven Majewski <sdm7g at virginia.edu>
Sent: Thursday, July 9, 2015 5:59 PM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] logged in admin users?

Is there any way, other than scanning through the log files, to tell if users
are currently logged into the frontend admin webapp ?  The purpose being to
check if it’s save to shutdown and restart the app without the chance of someone
having unsaved edits.



— Steve Majewski




More information about the Archivesspace_Users_Group mailing list