aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Directory.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-12 21:43:46 -0800
committerzotlabs <mike@macgirvin.com>2017-11-12 21:43:46 -0800
commit7b6ddeb859288a87573b922dcce086de21189f8c (patch)
treef513ea3f84be23d5c330f55ff9290bdec8925566 /Zotlabs/Module/Directory.php
parentb12dc89bb1fbdc29f82fffee3587360d618ef603 (diff)
downloadvolse-hubzilla-7b6ddeb859288a87573b922dcce086de21189f8c.tar.gz
volse-hubzilla-7b6ddeb859288a87573b922dcce086de21189f8c.tar.bz2
volse-hubzilla-7b6ddeb859288a87573b922dcce086de21189f8c.zip
allow a site to block (public) the directory separately from other resources.
Diffstat (limited to 'Zotlabs/Module/Directory.php')
-rw-r--r--Zotlabs/Module/Directory.php5
1 files changed, 5 insertions, 0 deletions
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');