X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e0028d8639a280f453282eb337ecdf043a519ac6..d09009b1fab73549e129ce5c5e071276e5618779:/app/controllers/notes_controller.rb diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index a297748bd..333597a72 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -155,8 +155,8 @@ class NotesController < ApplicationController # Find the note and check it is valid @note = Note.find_by_id(id) raise OSM::APINotFoundError unless @note - raise OSM::APIAlreadyDeletedError.new("note", @note.id) unless @note.visible? - raise OSM::APINoteAlreadyOpenError.new(@note) unless @note.closed? + raise OSM::APIAlreadyDeletedError.new("note", @note.id) unless @note.visible? or @user.moderator? + raise OSM::APINoteAlreadyOpenError.new(@note) unless @note.closed? or not @note.visible? # Reopen the note and add a comment Note.transaction do