e166e5747c
Enable frozen string for the following files: * lib/gitlab/auth/**/*.rb * lib/gitlab/badge/**/*.rb * lib/gitlab/bare_repository_import/**/*.rb * lib/gitlab/bitbucket_import/**/*.rb * lib/gitlab/bitbucket_server_import/**/*.rb * lib/gitlab/cache/**/*.rb * lib/gitlab/checks/**/*.rb Partially addresses #47424.
19 lines
440 B
Ruby
19 lines
440 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Auth
|
|
class TooManyIps < StandardError
|
|
attr_reader :user_id, :ip, :unique_ips_count
|
|
|
|
def initialize(user_id, ip, unique_ips_count)
|
|
@user_id = user_id
|
|
@ip = ip
|
|
@unique_ips_count = unique_ips_count
|
|
end
|
|
|
|
def message
|
|
"User #{user_id} from IP: #{ip} tried logging from too many ips: #{unique_ips_count}"
|
|
end
|
|
end
|
|
end
|
|
end
|