Add overview of active sessions (#3929)
* Add overview of active sessions * Better display of browser/platform name * Improve how browser information is stored and displayed for sessions overview * Fix test
This commit is contained in:
parent
099a3b4eac
commit
f7301bd5b9
15 changed files with 147 additions and 30 deletions
|
@ -91,8 +91,10 @@ class User < ApplicationRecord
|
|||
settings.auto_play_gif
|
||||
end
|
||||
|
||||
def activate_session
|
||||
session_activations.activate(SecureRandom.hex).session_id
|
||||
def activate_session(request)
|
||||
session_activations.activate(session_id: SecureRandom.hex,
|
||||
user_agent: request.user_agent,
|
||||
ip: request.ip).session_id
|
||||
end
|
||||
|
||||
def exclusive_session(id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue