posts: show takedown page for banned artists and posts.
Show a "This page has been removed because of a takedown request" error when an unauthorized user searches for a banned tag, or tries to view a banned post.
This commit is contained in:
@@ -40,6 +40,7 @@ class ArtistsController < ApplicationController
|
||||
|
||||
def show
|
||||
@artist = authorize Artist.find(params[:id])
|
||||
raise PageRemovedError if request.format.html? && @artist.is_banned? && !policy(@artist).can_view_banned?
|
||||
respond_with(@artist)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user