mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +02:00
Deprecate AssertPermissionTrait (#2044)
This commit is contained in:
committed by
GitHub
parent
2b3dec2be1
commit
eaac78650f
@@ -11,12 +11,9 @@ namespace Flarum\Notification\Command;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Flarum\Notification\Notification;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
|
||||
class ReadNotificationHandler
|
||||
{
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
* @param ReadNotification $command
|
||||
* @return \Flarum\Notification\Notification
|
||||
@@ -26,7 +23,7 @@ class ReadNotificationHandler
|
||||
{
|
||||
$actor = $command->actor;
|
||||
|
||||
$this->assertRegistered($actor);
|
||||
$actor->assertRegistered();
|
||||
|
||||
$notification = Notification::where('user_id', $actor->id)->findOrFail($command->notificationId);
|
||||
|
||||
|
Reference in New Issue
Block a user