Commit 95751331 authored by mmn's avatar mmn

Network wide public feed auth check fix

parent 4c14794c
......@@ -11,6 +11,9 @@ class ApiTimelineNetworkPublicAction extends ApiTimelinePublicAction
protected function getStream()
{
if (!$this->scoped instanceof Profile && common_config('public', 'localonly')) {
$this->clientError(_('Network wide public feed is not permitted without authorization'), 403);
}
return new NetworkPublicNoticeStream($this->scoped);
}
}
......@@ -7,7 +7,7 @@ class NetworkpublicAction extends PublicAction
protected function streamPrepare()
{
if (!$this->scoped instanceof Profile && common_config('public', 'localonly')) {
$this->serverError(_('Network wide public feed is not permitted without authorization'), 403);
$this->clientError(_('Network wide public feed is not permitted without authorization'), 403);
}
if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) {
$this->stream = new NetworkPublicNoticeStream($this->scoped);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment