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/devise_failure.rb')
-rw-r--r--lib/gitlab/devise_failure.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/devise_failure.rb b/lib/gitlab/devise_failure.rb
index ffd057e1d33..2c48ad3b46b 100644
--- a/lib/gitlab/devise_failure.rb
+++ b/lib/gitlab/devise_failure.rb
@@ -7,6 +7,14 @@ module Gitlab
def http_auth?
request_format && super
end
+
+ def respond
+ if warden_options[:reason] == :too_many_requests
+ self.status = 403
+ else
+ super
+ end
+ end
end
end