Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Inertia: Use check instead of authorize for canCreateTeams #129

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

RobertBoes
Copy link
Contributor

The authorize call in ShareInertiaData causes an AuthorizationException, this means the data is not shared with Inertia. Changing authorize to check returns the boolean value and will populate canCreateTeams correctly when TeamPolicy->create returns false.

This closes #113

@RobertBoes RobertBoes changed the title Use check instead of authorize for canCreateTeams [1.x] Inertia: Use check instead of authorize for canCreateTeams Sep 10, 2020
@lostdesign
Copy link
Contributor

Could reproduce the behavior and confirm it works :D Not that my comment matters but still wanted to comment.
image

@taylorotwell taylorotwell merged commit 700c635 into laravel:1.x Sep 10, 2020
@RobertBoes RobertBoes deleted the patch-1 branch September 10, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Returning false from TeamPolicy->create causes 403 error on all pages when user is logged in
3 participants