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

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

Closed
RobertBoes opened this issue Sep 9, 2020 · 0 comments · Fixed by #129

Comments

@RobertBoes
Copy link
Contributor

RobertBoes commented Sep 9, 2020

  • Jetstream Version: 1.0.2
  • Laravel Version: 8.0.1
  • PHP Version: 7.4.7
  • Database Driver & Version: mysql Ver 14.14 Distrib 5.7.29, for osx10.15
  • Stack: Inertia

Description:

I wanted to limit the creation of teams, for example only when the user has an active subscription. But, when returning false from App\Policies\TeamPolicy->create all pages respond with a 403 when the user is logged in.

Steps To Reproduce:

  • Create a new Laravel + Jetstream project using laravel new saas --jet --stack=inertia --teams
  • Update mysql credentials in .env
  • Create a user by navigating to http://saas.test/register
  • Change the return statement in App\Policies\TeamPolicy->create to false.
  • Refresh the dashboard or navigate to another page, now a 403 error will be shown
@RobertBoes RobertBoes changed the title Returning false from ThemePolicy->create causes 403 error on all pages when user is logged in Returning false from TeamPolicy->create causes 403 error on all pages when user is logged in Sep 10, 2020
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 a pull request may close this issue.

1 participant