X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbe165bbb3d6eda37d9579f1ac767599f9055607..ec9d2fde783796829a84655387e1810ea4b5e642:/app/controllers/browse_controller.rb diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index c7f8b0e81..0ac45b926 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -76,7 +76,14 @@ class BrowseController < ApplicationController def note @type = "note" - @note = Note.find(params[:id]) + + if @user && @user.moderator? + @note = Note.find(params[:id]) + @note_comments = @note.comments.unscope(:where => :visible) + else + @note = Note.visible.find(params[:id]) + @note_comments = @note.comments + end rescue ActiveRecord::RecordNotFound render :action => "not_found", :status => :not_found end