Skip to content

Commit

Permalink
Use check instead of authorize for canCreateTeams (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBoes authored Sep 10, 2020
1 parent e88db7c commit 700c635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Middleware/ShareInertiaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function handle($request, $next)
return [
'canCreateTeams' => $request->user() &&
Jetstream::hasTeamFeatures() &&
Gate::forUser($request->user())->authorize('create', Jetstream::newTeamModel()),
Gate::forUser($request->user())->check('create', Jetstream::newTeamModel()),
'canManageTwoFactorAuthentication' => Features::canManageTwoFactorAuthentication(),
'flash' => $request->session()->get('flash', []),
'hasApiFeatures' => Jetstream::hasApiFeatures(),
Expand Down

0 comments on commit 700c635

Please sign in to comment.