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
path: root/app
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-05-11 10:35:27 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-11 15:27:22 +0300
commitf25e00bc1e2ece94189cffbc3ffdda6588084cb3 (patch)
tree94f4e2ccd6184f9e16ff18150ea26f92e96e8da3 /app
parent35816eb7be76aa1a26dcf2f9cfeddf7c60b2da26 (diff)
Enforce terms acceptance before other requirements
This prevents a redirect loop when a user has to enable 2FA and accept the terms. Now they will need to accept the terms, then enable 2FA, or any other requirements.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/users/terms_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/users/terms_controller.rb b/app/controllers/users/terms_controller.rb
index 95c5c3432d5..ab685b9106e 100644
--- a/app/controllers/users/terms_controller.rb
+++ b/app/controllers/users/terms_controller.rb
@@ -3,6 +3,10 @@ module Users
include InternalRedirect
skip_before_action :enforce_terms!
+ skip_before_action :check_password_expiration
+ skip_before_action :check_two_factor_requirement
+ skip_before_action :require_email
+
before_action :terms
layout 'terms'