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:
@@ -11,7 +11,7 @@
|
||||
Categories:
|
||||
<%= link_to "All", forum_topics_path %>,
|
||||
<%= link_to "New", forum_topics_path(search: { is_read: false }) %>,
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<% if policy(ForumTopic).moderate? %>
|
||||
<%= link_to "Private", forum_topics_path(search: { is_private: true }) %>,
|
||||
<% end %>
|
||||
<%= ForumTopic::CATEGORIES.map {|id, name| link_to_unless_current(name, forum_topics_path(:search => {:category_id => id}))}.join(", ").html_safe %>
|
||||
|
||||
Reference in New Issue
Block a user