mirror of
https://github.com/flarum/core.git
synced 2025-07-31 21:50:50 +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:
@@ -72,7 +72,6 @@ class ListUsersController extends AbstractListController
|
||||
{
|
||||
$actor = $request->getAttribute('actor');
|
||||
|
||||
$this->assertRegistered($actor);
|
||||
$this->assertCan($actor, 'viewUserList');
|
||||
|
||||
$query = Arr::get($this->extractFilter($request), 'q');
|
||||
|
Reference in New Issue
Block a user