summaryrefslogtreecommitdiff
path: root/app/controllers/users/terms_controller.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-05-11 09:35:27 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-11 14:27:22 +0200
commitf25e00bc1e2ece94189cffbc3ffdda6588084cb3 (patch)
tree94f4e2ccd6184f9e16ff18150ea26f92e96e8da3 /app/controllers/users/terms_controller.rb
parent35816eb7be76aa1a26dcf2f9cfeddf7c60b2da26 (diff)
downloadgitlab-ce-f25e00bc1e2ece94189cffbc3ffdda6588084cb3.tar.gz
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/controllers/users/terms_controller.rb')
-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'