Restrict post replacements to mod+ (issue #3348)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class PostReplacementsController < ApplicationController
|
class PostReplacementsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
before_filter :approver_only, except: [:index]
|
before_filter :moderator_only, except: [:index]
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@post = Post.find(params[:post_id])
|
@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>
|
<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 %>
|
<% end %>
|
||||||
|
|
||||||
<li><%= link_to "Replace Image", new_post_replacement_path(:post_id => post.id), :id => "replace-image" %></li>
|
|
||||||
|
|
||||||
<% if CurrentUser.is_moderator? %>
|
<% 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>
|
<li><%= link_to "Down vote report", reports_down_voting_post_path(post_id: post.id) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user