diff options
Diffstat (limited to 'app/controllers/directories_controller.rb')
-rw-r--r-- | app/controllers/directories_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/directories_controller.rb b/app/controllers/directories_controller.rb index 9d65361a6..1c8ebdac9 100644 --- a/app/controllers/directories_controller.rb +++ b/app/controllers/directories_controller.rb @@ -3,6 +3,7 @@ class DirectoriesController < ApplicationController layout 'public' + before_action :check_enabled before_action :set_instance_presenter before_action :set_tag, only: :show before_action :set_tags @@ -23,6 +24,10 @@ class DirectoriesController < ApplicationController use_pack 'share' end + def check_enabled + return not_found unless Setting.profile_directory + end + def set_tag @tag = Tag.discoverable.find_by!(name: params[:id].downcase) end |