Skip to content

Commit

Permalink
Merge pull request #1946 from iljalukin/renderable-auth
Browse files Browse the repository at this point in the history
Check authorization in RenderableController
  • Loading branch information
jqhph authored Nov 19, 2022
2 parents 482f90d + b402cf0 commit 9565079
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Controllers/RenderableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public function handle(Request $request)

$renderable = $this->newRenderable($request);

if (method_exists($renderable, 'passesAuthorization') && ! $renderable->passesAuthorization()) {
return $renderable->failedAuthorization();
}

$this->addScript();

$this->forgetDefaultAssets();
Expand Down

0 comments on commit 9565079

Please sign in to comment.