Commit 6e57ec58 authored by blackst0ne's avatar blackst0ne

[Rails5] Fix error on missed :authenticate_user callback

Since 5.0 Rails by default now raises the ArgumentError if an unrecognized
callback is skipped. [1]

This commit adds `raise: false` to act as rails 4.

[1]: https://github.com/rails/rails/commit/d2876141d08341ec67cf6a11a073d1acfb920de7
parent c3fd5573
......@@ -2,7 +2,7 @@ class Projects::VulnerabilityFeedbackController < Projects::ApplicationControlle
before_action :vulnerability_feedback, only: [:destroy]
before_action :authorize_read_vulnerability_feedback!, only: [:index]
before_action :authorize_admin_vulnerability_feedback!, only: [:create, :destroy]
skip_before_action :authenticate_user!, only: [:index]
skip_before_action :authenticate_user!, only: [:index], raise: false
respond_to :json
......
class UnsubscribesController < ApplicationController
skip_before_action :authenticate_user!,
:reject_blocked, :set_current_user_for_observers,
:add_abilities
:add_abilities, raise: false
def show
@user = get_user
......
---
title: "[Rails5] Fix error on missed :authenticate_user callback"
merge_request: 6257
author: "@blackst0ne"
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment