diff --git a/app/logical/post_sets/post.rb b/app/logical/post_sets/post.rb index 88cd0ba36..43230b9b4 100644 --- a/app/logical/post_sets/post.rb +++ b/app/logical/post_sets/post.rb @@ -26,7 +26,7 @@ module PostSets def wiki_page return nil unless tag.present? && tag.wiki_page.present? - return nil unless !tag.wiki_page.is_deleted? && tag.wiki_page.visible? + return nil unless !tag.wiki_page.is_deleted? tag.wiki_page end @@ -37,7 +37,7 @@ module PostSets def artist return nil unless tag.present? && tag.category == Tag.categories.artist - return nil unless tag.artist.present? && tag.artist.is_active? && tag.artist.visible? + return nil unless tag.artist.present? && tag.artist.is_active? tag.artist end diff --git a/app/models/artist.rb b/app/models/artist.rb index b344a4bf4..f85bcc044 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -538,8 +538,4 @@ class Artist < ApplicationRecord "Deleted" end end - - def visible? - !is_banned? || CurrentUser.is_gold? - end end diff --git a/app/models/artist_version.rb b/app/models/artist_version.rb index 03bde80fa..3a75a4168 100644 --- a/app/models/artist_version.rb +++ b/app/models/artist_version.rb @@ -4,7 +4,6 @@ class ArtistVersion < ApplicationRecord belongs_to_updater belongs_to :artist - delegate :visible?, :to => :artist module SearchMethods def search(params) diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 18f6a57f6..7df94325b 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -244,10 +244,6 @@ class WikiPage < ApplicationRecord TagAlias.to_aliased(titles & tags) end - def visible? - artist.blank? || !artist.is_banned? || CurrentUser.is_builder? - end - def to_param if title =~ /\A\d+\z/ "~#{title}" diff --git a/app/models/wiki_page_version.rb b/app/models/wiki_page_version.rb index b0da8ffb3..3dbdec763 100644 --- a/app/models/wiki_page_version.rb +++ b/app/models/wiki_page_version.rb @@ -3,7 +3,6 @@ class WikiPageVersion < ApplicationRecord belongs_to :wiki_page belongs_to_updater belongs_to :artist, optional: true - delegate :visible?, :to => :wiki_page module SearchMethods def search(params) diff --git a/app/views/artist_versions/_listing.html.erb b/app/views/artist_versions/_listing.html.erb index a9315b7a0..0275adff0 100644 --- a/app/views/artist_versions/_listing.html.erb +++ b/app/views/artist_versions/_listing.html.erb @@ -2,26 +2,22 @@ <%= table_for @artist_versions, {class: "striped autofit", width: "100%"} do |t| %> <% t.column "Name" do |artist_version| %> - <% if artist_version.visible? %> - <%= link_to artist_version.name, artist_path(artist_version.artist_id) %> - <%= link_to "»", artist_versions_path(search: {artist_id: artist_version.artist_id}) %> + <%= link_to artist_version.name, artist_path(artist_version.artist_id) %> + <%= link_to "»", artist_versions_path(search: {artist_id: artist_version.artist_id}) %> - <% if !artist_version.is_active? %> - (deleted) - <% end %> + <% if !artist_version.is_active? %> + (deleted) + <% end %> - <% if artist_version.group_name.present? %> -
(group: <%= artist_version.group_name %>)
- <% end %> + <% if artist_version.group_name.present? %> +(group: <%= artist_version.group_name %>)
<% end %> <% end %> <% t.column "Other Names" do |artist_version| %> - <% if artist_version.visible? %> - <%= artist_version_other_names_diff(artist_version) %> - <% end %> + <%= artist_version_other_names_diff(artist_version) %> <% end %> <% t.column "URLs", td: {class: "col-expand"} do |artist_version| %> - <%= artist_version_urls_diff(artist_version) if artist_version.visible? %> + <%= artist_version_urls_diff(artist_version) %> <% end %> <% t.column "Updated" do |artist_version| %> <%= link_to_user artist_version.updater %> diff --git a/app/views/artists/_show.html.erb b/app/views/artists/_show.html.erb index fd1270394..2dc98e1ab 100644 --- a/app/views/artists/_show.html.erb +++ b/app/views/artists/_show.html.erb @@ -5,7 +5,7 @@The artist requested removal of this page.
- <% else %> - <%= render "form" %> - <% end %> + <%= render "form" %>The artist requested removal of this page.
- <% end %> +