diff --git a/app/policies/artist_policy.rb b/app/policies/artist_policy.rb index 1cd5dc2f6..ae0851d38 100644 --- a/app/policies/artist_policy.rb +++ b/app/policies/artist_policy.rb @@ -11,6 +11,10 @@ class ArtistPolicy < ApplicationPolicy unbanned? end + def can_view_banned? + user.is_member? + end + def permitted_attributes [:name, :other_names, :other_names_string, :group_name, :url_string, :is_deleted] end diff --git a/app/views/artists/_show.html.erb b/app/views/artists/_show.html.erb index 46ba09d94..3e7a65bec 100644 --- a/app/views/artists/_show.html.erb +++ b/app/views/artists/_show.html.erb @@ -5,26 +5,30 @@

Artist: <%= link_to @artist.pretty_name, posts_path(tags: @artist.name), class: tag_class(@artist.tag) %>

- <% if @artist.wiki_page.present? %> -
- <%= format_text(@artist.wiki_page.body, :disable_mentions => true) %> -
- -

<%= link_to "View wiki page", @artist.wiki_page %>

- <% end %> - - <%= yield %> - - <% if @artist.tag.present? && @artist.tag.post_count > 0 %> -
-

Recent Posts <%= link_to "»", posts_path(tags: @artist.name) %>

- - <%= render "posts/partials/common/inline_blacklist" %> - -
- <%= post_previews_html(@artist.tag.posts.limit(8), tags: @artist.name) %> + <% if @artist.is_banned? && !policy(@artist).can_view_banned? %> +

The artist requested removal of this page.

+ <% else %> + <% if @artist.wiki_page.present? %> +
+ <%= format_text(@artist.wiki_page.body, :disable_mentions => true) %>
-
- <% end %> + +

<%= link_to "View wiki page", @artist.wiki_page %>

+ <% end %> + + <%= yield %> + + <% if @artist.tag.present? && @artist.tag.post_count > 0 %> +
+

Recent Posts <%= link_to "»", posts_path(tags: @artist.name) %>

+ + <%= render "posts/partials/common/inline_blacklist" %> + +
+ <%= post_previews_html(@artist.tag.posts.limit(8), tags: @artist.name) %> +
+
+ <% end %> + <% end%>
diff --git a/app/views/posts/partials/index/_excerpt.html.erb b/app/views/posts/partials/index/_excerpt.html.erb index 3ab975386..bda961e4b 100644 --- a/app/views/posts/partials/index/_excerpt.html.erb +++ b/app/views/posts/partials/index/_excerpt.html.erb @@ -1,7 +1,9 @@ <%# post_set %>