diff options
Diffstat (limited to 'app/models/active_session.rb')
-rw-r--r-- | app/models/active_session.rb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/app/models/active_session.rb b/app/models/active_session.rb index 2d1dec1977d..133466e93e3 100644 --- a/app/models/active_session.rb +++ b/app/models/active_session.rb @@ -91,13 +91,6 @@ class ActiveSession active_user_session.dump ) - # Deprecated legacy format - temporary to support mixed deployments - pipeline.setex( - key_name_v1(user.id, session_private_id), - expiry, - Marshal.dump(active_user_session) - ) - pipeline.sadd?( lookup_key_name(user.id), session_private_id @@ -107,6 +100,19 @@ class ActiveSession end end + # set marketing cookie when user has active session + def self.set_active_user_cookie(auth) + auth.cookies[:about_gitlab_active_user] = + { + value: true, + domain: Gitlab.config.gitlab.host + } + end + + def self.unset_active_user_cookie(auth) + auth.cookies.delete :about_gitlab_active_user + end + def self.list(user) Gitlab::Redis::Sessions.with do |redis| cleaned_up_lookup_entries(redis, user).map do |raw_session| |