pundit: add missing authorize calls.
This commit is contained in:
@@ -13,7 +13,7 @@ class ForumPostsController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
@forum_posts = ForumPost.visible(CurrentUser.user).paginated_search(params)
|
||||
@forum_posts = authorize ForumPost.visible(CurrentUser.user).paginated_search(params)
|
||||
@forum_posts = @forum_posts.includes(:topic, :creator) if request.format.html?
|
||||
|
||||
respond_with(@forum_posts)
|
||||
|
||||
Reference in New Issue
Block a user