diff options
author | Logan Fick <logaldeveloper@protonmail.com> | 2018-06-09 13:02:43 -0400 |
---|---|---|
committer | Logan Fick <logaldeveloper@protonmail.com> | 2018-06-09 13:02:43 -0400 |
commit | 09e3312ccaf3215876444c6f3afc08b0c7eea4ce (patch) | |
tree | a2cf8d57735b6fbd7627a271e66f373606b5ae63 | |
parent | 12efb769302317128057807ce3912b4da18abd3c (diff) |
Made formatting more consistent.
-rw-r--r-- | app/controllers/application_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7548b33..063c173 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -43,7 +43,7 @@ class ApplicationController < ActionController::Base def check_2fa # Over complicated way of asking if the user is logged in as a mod without TOTP enabled while they are not on their login settings screen, logging out, or updating their login settings. - if current_user && current_user.mod? && !current_user.totp_enabled? && (!(controller_name == "users") || !(action_name == "edit_login")) && !(controller_name == "sessions" && action_name == "destroy") && !(action_name == "update_login") + if current_user && current_user.mod? && !current_user.totp_enabled? && !(controller_name == "users" && action_name == "edit_login") && !(controller_name == "sessions" && action_name == "destroy") && !(controller_name == "users" && action_name == "update_login") flash[:alert] = "Due to your staff rank, you are required to enable 2FA." redirect_to :controller => "users", :action => "edit_login", :id => current_user.id end |