artists: hide other names of banned artists on index page.

Don't show other names of banned artists on the /artists page to
anonymous users. Hides potentially sensitive information from Google and
logged out users.
This commit is contained in:
evazion
2020-12-22 02:15:21 -06:00
parent fbb4cfb807
commit a084da2dbe

View File

@@ -13,8 +13,10 @@
<% end %>
<% end %>
<% t.column "Other Names", td: {class: "col-expand"} do |artist| %>
<% artist.other_names.each do |name| %>
<%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name", rel: "nofollow" %>
<% unless artist.is_banned? && !policy(artist).can_view_banned? %>
<% artist.other_names.each do |name| %>
<%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name", rel: "nofollow" %>
<% end %>
<% end %>
<% end %>
<% t.column "Status" do |artist| %>