pundit: convert forum topics / forum posts to pundit.
Fix it being possible for users to delete or undelete their own forum posts and topics, even if they were deleted by a mod.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<%= dtext_field "forum_post", "body", :classes => "autocomplete-mentions", :input_name => "forum_topic[original_post_attributes][body]", :value => forum_topic.original_post.body, :input_id => "forum_post_body_for_#{forum_topic.original_post.id}", :preview_id => "dtext-preview-for-#{forum_topic.original_post.id}" %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<% if policy(forum_topic).moderate? %>
|
||||
<%= f.input :min_level, :include_blank => false, :collection => available_min_user_levels %>
|
||||
<%= f.input :is_sticky, :label => "Sticky" %>
|
||||
<%= f.input :is_locked, :label => "Locked" %>
|
||||
|
||||
Reference in New Issue
Block a user