From 720daa81435b4c632cdf7b64044cf1ee59af977a Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 11 Dec 2018 19:18:29 +0100 Subject: Add instance-wide setting to disable profile directory (#9497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add instance-wide setting to disable profile directory Fixes #9496 When the profile directory is disabled: - The “discoverable” setting is hidden from users - The “profile directory” link is not shown on public pages - /explore returns 404 * Move Setting.profile_directory check to a before_action filter --- app/views/layouts/public.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/layouts') diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 831c7f012..93ed12f18 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -9,7 +9,8 @@ = link_to root_url, class: 'brand' do = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon' - = link_to t('directories.directory'), explore_path, class: 'nav-link' + - if Setting.profile_directory + = link_to t('directories.directory'), explore_path, class: 'nav-link' = link_to t('about.about_this'), about_more_path, class: 'nav-link' = link_to t('about.apps'), 'https://joinmastodon.org/apps', class: 'nav-link' .nav-center -- cgit