From 1a4faa4507b98ae103234f25b07c2a4e21c6017e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 8 Jul 2022 09:48:00 +0100 Subject: [PATCH] There is no need to do setup_user_auth and authorize for the same action --- app/controllers/api/notes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/notes_controller.rb b/app/controllers/api/notes_controller.rb index 7454e7f19..d21a64497 100644 --- a/app/controllers/api/notes_controller.rb +++ b/app/controllers/api/notes_controller.rb @@ -2,7 +2,7 @@ module Api class NotesController < ApiController before_action :check_api_readable before_action :check_api_writable, :only => [:create, :comment, :close, :reopen, :destroy] - before_action :setup_user_auth, :only => [:create, :comment, :show] + before_action :setup_user_auth, :only => [:create, :show] before_action :authorize, :only => [:close, :reopen, :destroy, :comment] authorize_resource -- 2.39.5