Prevent anon users from attempting to undelete/unvote comments.

The :undelete and :unvote actions weren't covered.
This commit is contained in:
evazion
2016-12-26 16:25:39 -06:00
parent 7c838f8525
commit c165b38a91

View File

@@ -1,6 +1,6 @@
class CommentsController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :only => [:update, :create, :edit, :destroy]
before_filter :member_only, :except => [:index, :search, :show]
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
def index