class EditPostHandler
Traits
Properties
protected Dispatcher | $events | from DispatchEventsTrait |
|
|
protected PostRepository | $posts |
|
||
protected PostValidator | $validator |
|
Methods
from DispatchEventsTrait
assertPermission(bool $condition)
Ensure the current user is allowed to do something.
Details
in DispatchEventsTrait
at
line 30
dispatchEventsFor(object $entity, User $actor = null)
Dispatch all events for an entity.
in AssertPermissionTrait
at
line 30
protected
assertPermission(bool $condition)
Ensure the current user is allowed to do something.
If the condition is not met, an exception will be thrown that signals the lack of permissions. This is about <em>authorization</em>, i.e. retrying such a request / operation without a change in permissions (or using another user account) is pointless.
in AssertPermissionTrait
at
line 47
protected
assertRegistered(User $actor)
Ensure the given actor is authenticated.
This will throw an exception for guest users, signaling that <em>authorization</em> failed. Thus, they could retry the operation after logging in (or using other means of authentication).