From 7b6ddeb859288a87573b922dcce086de21189f8c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 12 Nov 2017 21:43:46 -0800 Subject: allow a site to block (public) the directory separately from other resources. --- Zotlabs/Module/Directory.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Zotlabs/Module/Directory.php') diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php index 256667ef3..b1552a694 100644 --- a/Zotlabs/Module/Directory.php +++ b/Zotlabs/Module/Directory.php @@ -64,6 +64,11 @@ class Directory extends \Zotlabs\Web\Controller { return; } + if(get_config('system','block_public_directory',false) && (! get_observer_hash())) { + notice( t('Public access denied.') . EOL); + return; + } + $observer = get_observer_hash(); $globaldir = get_directory_setting($observer, 'globaldir'); -- cgit v1.2.3