aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Access
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-11 18:02:28 -0800
committerzotlabs <mike@macgirvin.com>2018-02-11 18:02:28 -0800
commita31331bfd9500ad7dab117692b2c118d99c5c2f0 (patch)
tree600e43db80cf844e11d55a10610a930653c4d2b2 /Zotlabs/Access
parent07d33a11830e52499842b99ded964b0a934116d7 (diff)
downloadvolse-hubzilla-a31331bfd9500ad7dab117692b2c118d99c5c2f0.tar.gz
volse-hubzilla-a31331bfd9500ad7dab117692b2c118d99c5c2f0.tar.bz2
volse-hubzilla-a31331bfd9500ad7dab117692b2c118d99c5c2f0.zip
hubzilla issue #972 - provide system toggle to allow/disallow anonymous comments
Diffstat (limited to 'Zotlabs/Access')
-rw-r--r--Zotlabs/Access/PermissionLimits.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php
index 9ee0656b1..1d15098fc 100644
--- a/Zotlabs/Access/PermissionLimits.php
+++ b/Zotlabs/Access/PermissionLimits.php
@@ -41,8 +41,10 @@ class PermissionLimits {
$limits = [];
$perms = Permissions::Perms();
+ $anon_comments = get_config('system','anonymous_comments',true);
+
foreach($perms as $k => $v) {
- if(strstr($k, 'view') || $k === 'post_comments')
+ if(strstr($k, 'view') || ($k === 'post_comments' && $anon_comments))
$limits[$k] = PERMS_PUBLIC;
else
$limits[$k] = PERMS_SPECIFIC;