artists: redact version histories of banned artists.

Fix names and urls of banned artists being visible in Google through
artist version pages.
This commit is contained in:
evazion
2021-02-07 22:19:26 -06:00
parent 30b7345900
commit e23f09235e
6 changed files with 24 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ class ArtistsController < ApplicationController
def index
# XXX
params[:search][:name] = params.delete(:name) if params[:name]
@artists = authorize Artist.paginated_search(params)
@artists = authorize Artist.visible(CurrentUser.user).paginated_search(params)
@artists = @artists.includes(:urls, :tag) if request.format.html?
respond_with(@artists)