From 59d92b448ebca56ebc47107c055543b98b9cbd29 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 4 Sep 2019 15:24:07 -0500 Subject: [PATCH] /artists: remove /artists/new from navbar for anon users. Fixes the logs being flooded with 403 errors because of bots and logged out users trying to access the new artist page. --- app/views/artists/_secondary_links.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/artists/_secondary_links.html.erb b/app/views/artists/_secondary_links.html.erb index 0957711c3..a03dc19ec 100644 --- a/app/views/artists/_secondary_links.html.erb +++ b/app/views/artists/_secondary_links.html.erb @@ -3,7 +3,9 @@
  • <%= render "artists/quick_search" %>
  • <%= subnav_link_to "Listing", artists_path %> <%= subnav_link_to "Banned", banned_artists_path %> - <%= subnav_link_to "New", new_artist_path %> + <% if CurrentUser.is_member? %> + <%= subnav_link_to "New", new_artist_path %> + <% end %> <%= subnav_link_to "Recent changes", artist_versions_path %> <%= subnav_link_to "URLs", artist_urls_path %> <% if @artist && !@artist.new_record? %>