diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-08-01 15:23:06 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-08-01 15:23:06 +0300 |
commit | 4bcf72e734fbafe99ec603d34819b8ab68bf390c (patch) | |
tree | 1c293c3ea6a51fb752335b8f5624593511444e1b /lib/gitlab | |
parent | e9d04585f872121d4b1f96e019946cfa48d2f915 (diff) |
Improve blocked user tracking and fire some events only once
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/auth/activity.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb index 9f84c578d4f..711631ccd64 100644 --- a/lib/gitlab/auth/activity.rb +++ b/lib/gitlab/auth/activity.rb @@ -32,8 +32,6 @@ module Gitlab when :invalid self.class.user_password_invalid_counter_increment! end - - self.class.user_blocked_counter_increment! if @user&.blocked? end def user_authenticated! @@ -51,6 +49,10 @@ module Gitlab end end + def user_blocked! + self.class.user_blocked_counter_increment! + end + def user_session_destroyed! self.class.user_session_destroyed_counter_increment! end |