blob: 654b9f696840a75b5b444cdab2c5e8d681c36b72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
module Gitlab
module Auth
class BlockedUserTracker
def initialize(user, auth)
@user = user
@auth = auth
end
def log_activity!
return unless @user.blocked?
Gitlab::AppLogger.info <<~INFO
"Failed login for blocked user: user=#{@user.username} ip=#{@auth.request.ip}")
INFO
SystemHooksService.new.execute_hooks_for(@user, :failed_login)
rescue TypeError
end
end
end
end
|