We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 4e8e77f6 authored by Zach Copley's avatar Zach Copley

Return HTTP 403 instead of 400 when silenced users try to post via API

parent db90bcb3
......@@ -332,7 +332,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
$options
);
} catch (Exception $e) {
$this->clientError($e->getMessage());
$this->clientError($e->getMessage(), $e->getCode());
return;
}
......
......@@ -275,7 +275,7 @@ class Notice extends Memcached_DataObject
if (!$profile->hasRight(Right::NEWNOTICE)) {
common_log(LOG_WARNING, "Attempted post from user disallowed to post: " . $profile->nickname);
throw new ClientException(_('You are banned from posting notices on this site.'));
throw new ClientException(_('You are banned from posting notices on this site.'), 403);
}
$notice = new Notice();
......
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