pundit: add missing authorize calls.

This commit is contained in:
evazion
2020-03-24 00:38:07 -05:00
parent 4a5bec71f6
commit 0ad5619484
5 changed files with 11 additions and 3 deletions

View File

@@ -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)