gitlab-org--gitlab-foss/lib/gitlab/auth/too_many_ips.rb
Pawel Chojnacki 0ef8a64348 Remove unecessary calls to limit_user!, UniqueIps Middleware, and address MR review
- cleanup formating in haml
 - clarify time window is in seconds
 - cleanup straneous chunks in db/schema
 - rename count_uniqe_ips to update_and_return_ips_count
 - other
2017-03-06 15:41:25 +01:00

17 lines
409 B
Ruby

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