add access check for post previews

This commit is contained in:
albert
2013-02-17 15:50:42 -05:00
parent caf976fb5e
commit b9355009a6
2 changed files with 5 additions and 1 deletions

View File

@@ -4,6 +4,10 @@ class PostPresenter < Presenter
return ""
end
unless Danbooru.config.can_user_see_post?(CurrentUser.user, post)
return ""
end
flags = []
flags << "pending" if post.is_pending?
flags << "flagged" if post.is_flagged?