From: Tom Hughes Date: Fri, 8 Jul 2022 08:48:00 +0000 (+0100) Subject: There is no need to do setup_user_auth and authorize for the same action X-Git-Tag: live~1965 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1a4faa4507b98ae103234f25b07c2a4e21c6017e There is no need to do setup_user_auth and authorize for the same action --- 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