Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth/activity.rb')
-rw-r--r--lib/gitlab/auth/activity.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb
index 9f84c578d4f..761f0819c60 100644
--- a/lib/gitlab/auth/activity.rb
+++ b/lib/gitlab/auth/activity.rb
@@ -18,8 +18,7 @@ module Gitlab
user_blocked: 'Counter of sign in attempts when user is blocked'
}.freeze
- def initialize(user, opts)
- @user = user
+ def initialize(opts)
@opts = opts
end
@@ -32,8 +31,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 +48,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