add access check for post previews
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<p><%= link_to "Reply »".html_safe, new_forum_post_path(:topic_id => @forum_topic.id) %></p>
|
||||
|
||||
<div style="display: none;" id="topic-response">
|
||||
<div id="topic-response">
|
||||
<%= render "forum_posts/form", :forum_post => ForumPost.new(:topic_id => @forum_topic.id) %>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user