diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index fb53acc41..f2666ad02 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -16,12 +16,6 @@ class PostsController < ApplicationController def show @post = Post.find(params[:id]) - - if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post) - redirect_to(:back, :notice => "Post #{@post.id} is not available") - return - end - @post_flag = PostFlag.new(:post_id => @post.id) @post_appeal = PostAppeal.new(:post_id => @post.id) respond_with(@post) diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 921097e95..5fb4bde4b 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -49,7 +49,9 @@
  • Comments
  • -
  • Edit
  • + <% if Danbooru.config.can_user_see_post?(CurrentUser.user, @post) %> +
  • Edit
  • + <% end %>
  • Share
  • @@ -61,9 +63,11 @@ <%= render :partial => "notes/note", :collection => @post.notes.active %> - + <% if Danbooru.config.can_user_see_post?(CurrentUser.user, @post) %> + + <% end %>