1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

Access request actor in error handler (#2410)

* Add an ActorReference class to store the actor `$request->getAttribute('actorReference')->getActor()`
* Add a middleware to inject the actor reference
* Deprecate `$request->getAttribute('actor')`
This commit is contained in:
Sami Mazouz
2021-04-12 18:42:22 +01:00
committed by GitHub
parent b6f0b01307
commit 9e3699ea47
6 changed files with 74 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ class AdminServiceProvider extends AbstractServiceProvider
$this->container->singleton('flarum.admin.middleware', function () {
return [
HttpMiddleware\InjectActorReference::class,
'flarum.admin.error_handler',
HttpMiddleware\ParseJsonBody::class,
HttpMiddleware\StartSession::class,