From b677bdd4ff60e9ac22d33c86d6250b106115df92 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 4 Jan 2018 14:39:47 +0000 Subject: [PATCH] Ensuring that only local users can comment on community items --- include/conversation.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index ff5dc2aed7..d6b6bd8eee 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -619,7 +619,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { $community_readonly = ($mode === 'community'); // Currently behind a config value. This allows the commenting and sharing of every public item. - if (Config::get('system', 'comment_public') && local_user()) { + if (Config::get('system', 'comment_public')) { if ($mode === 'community') { $community_readonly = false; $writable = true; @@ -630,6 +630,10 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { $writable = false; } + if (!local_user()) { + $writable = false; + } + if ($mode === 'network-new' || $mode === 'search' || $community_readonly) { /*