pundit: convert posts to pundit.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
<%= render "post_disapprovals/counts", :disapprovals => post.disapprovals, :post => post %>
|
||||
|
||||
<% if CurrentUser.can_approve_posts? && !post.disapproved_by?(CurrentUser.user) %>
|
||||
<% if policy(PostDisapproval).create? && !post.disapproved_by?(CurrentUser.user) %>
|
||||
<%= render "modqueue/quick_mod", post: post %>
|
||||
<%= render "post_disapprovals/detailed_rejection_dialog" %>
|
||||
<% end %>
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.visible? && post.has_large? && !post.is_ugoira? %>
|
||||
<% if policy(post).visible? && post.has_large? && !post.is_ugoira? %>
|
||||
<div class="notice notice-small post-notice post-notice-resized" id="image-resize-notice" style="<%= CurrentUser.default_image_size == "original" ? "display: none;" : "" %>">
|
||||
<span>Resized to <%= number_to_percentage post.resize_percentage.floor, :precision => 0 %> of original (<%= link_to "view original", post.tagged_file_url, :id => "image-resize-link" %>)</span>
|
||||
<span style="display: none;">Loading...</span>
|
||||
|
||||
Reference in New Issue
Block a user