diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-11 10:35:27 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-11 15:27:22 +0300 |
commit | f25e00bc1e2ece94189cffbc3ffdda6588084cb3 (patch) | |
tree | 94f4e2ccd6184f9e16ff18150ea26f92e96e8da3 /app/controllers/users | |
parent | 35816eb7be76aa1a26dcf2f9cfeddf7c60b2da26 (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/controllers/users')
-rw-r--r-- | app/controllers/users/terms_controller.rb | 4 |
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' |