1
1
Fork 0

Ensuring that only local users can comment on community items

This commit is contained in:
Michael 2018-01-04 14:39:47 +00:00
parent 6531313b73
commit b677bdd4ff

View file

@ -619,7 +619,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
$community_readonly = ($mode === 'community'); $community_readonly = ($mode === 'community');
// Currently behind a config value. This allows the commenting and sharing of every public item. // 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') { if ($mode === 'community') {
$community_readonly = false; $community_readonly = false;
$writable = true; $writable = true;
@ -630,6 +630,10 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
$writable = false; $writable = false;
} }
if (!local_user()) {
$writable = false;
}
if ($mode === 'network-new' || $mode === 'search' || $community_readonly) { if ($mode === 'network-new' || $mode === 'search' || $community_readonly) {
/* /*