1
0
mirror of https://github.com/flarum/core.git synced 2025-07-28 12:10:51 +02:00

Move authentication check into assertCan() method

This will cause the right error (HTTP 401) to be thrown whenever
we're checking for a specific permission, but the user is not even
logged in. Authenticated users will still get HTTP 403.
This commit is contained in:
Franz Liedke
2019-08-21 23:46:00 +02:00
parent 0836d99e83
commit b60617b849
3 changed files with 8 additions and 2 deletions

View File

@@ -49,7 +49,6 @@ class CreateGroupHandler
$actor = $command->actor;
$data = $command->data;
$this->assertRegistered($actor);
$this->assertCan($actor, 'createGroup');
$group = Group::build(