mirror of
https://github.com/flarum/framework.git
synced 2025-05-24 23:59:57 +08:00
Fix inconsistent status codes
HTTP 401 should be used when logging in (i.e. authenticating) would make a difference; HTTP 403 is reserved for requests that fail because the already authenticated user is not authorized (i.e. lacking permissions) to do something.
This commit is contained in:

committed by
Daniël Klabbers

parent
53c728b184
commit
f7222d7e20
@ -78,7 +78,7 @@ class CreateGroupControllerTest extends ApiControllerTestCase
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function unauthorized_user_cannot_create_group()
|
||||
public function normal_user_cannot_create_group()
|
||||
{
|
||||
$this->actor = User::find(2);
|
||||
|
||||
|
Reference in New Issue
Block a user