diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-06 22:37:59 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-06 22:37:59 +1100 |
commit | ec144bddb9ca8d1e72de4b45c1c0d726556cd9a4 (patch) | |
tree | c026dbffc9d99dc317045f3a432e5b26fd0aae47 /app | |
parent | 41ee09c9a06b41d904977def6e7824928f27596a (diff) | |
download | gitlab-ce-ec144bddb9ca8d1e72de4b45c1c0d726556cd9a4.tar.gz |
[Rails5] Add `raise: false` to skip_before_action in authenticates_with_two_factor.rbblackst0ne-rails5-update-skip-before-action-in-authenticates-with-two-factor-concern
Rails 5.0 raises `ArgumentErrror` if an unrecognised callback is skipped.
https://github.com/rails/rails/commit/8b88df94ebda2e829782f514ff51caeaf5e694dd
This commit adds `raise: false` to the filter.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/concerns/authenticates_with_two_factor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb index 2753f83c3cf..2fdf346ef44 100644 --- a/app/controllers/concerns/authenticates_with_two_factor.rb +++ b/app/controllers/concerns/authenticates_with_two_factor.rb @@ -10,7 +10,7 @@ module AuthenticatesWithTwoFactor # This action comes from DeviseController, but because we call `sign_in` # manually, not skipping this action would cause a "You are already signed # in." error message to be shown upon successful login. - skip_before_action :require_no_authentication, only: [:create] + skip_before_action :require_no_authentication, only: [:create], raise: false end # Store the user's ID in the session for later retrieval and render the |