Commit f58efcf7 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch '55564-ce-remove-if-in-before-after-action' into 'master'

Remove `if:` argument in before_action and alike when `only:` is also used

See merge request gitlab-org/gitlab-ee!15166
parents 211ee945 4077d05e
......@@ -8,7 +8,7 @@ class Projects::MergeRequests::DraftsController < Projects::MergeRequests::Appli
before_action :check_draft_notes_available!, except: [:index]
before_action :authorize_create_draft!, only: [:create]
before_action :authorize_admin_draft!, only: [:update, :destroy]
before_action :authorize_admin_draft!, only: [:publish], if: -> { params[:id].present? }
before_action :authorize_admin_draft!, if: -> { action_name == 'publish' && params[:id].present? }
def index
drafts = prepare_notes_for_rendering(draft_notes)
......
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