Restrict post replacements to mod+ (issue #3348)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class PostReplacementsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :approver_only, except: [:index]
|
||||
before_filter :moderator_only, except: [:index]
|
||||
|
||||
def new
|
||||
@post = Post.find(params[:post_id])
|
||||
|
||||
@@ -55,9 +55,8 @@
|
||||
<li><%= link_to "Expunge", expunge_moderator_post_post_path(:post_id => post.id), :remote => true, :method => :post, :id => "expunge", :data => {:confirm => "This will permanently delete this post (meaning the file will be deleted). Are you sure you want to delete this post?"} %></li>
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Replace Image", new_post_replacement_path(:post_id => post.id), :id => "replace-image" %></li>
|
||||
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<li><%= link_to "Replace Image", new_post_replacement_path(:post_id => post.id), :id => "replace-image" %></li>
|
||||
<li><%= link_to "Down vote report", reports_down_voting_post_path(post_id: post.id) %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user