diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 0f5cb680b..2709f2816 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -21,7 +21,11 @@ class CommentsController < ApplicationController def show @comment = Comment.find(params[:id]) - set_comment_flags(@comment.subtree) + if @comment.valuation && @comment.author != current_user + raise ActiveRecord::RecordNotFound + else + set_comment_flags(@comment.subtree) + end end def vote