-
Notifications
You must be signed in to change notification settings - Fork 43
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
bug: ResourceQuery::authorizeResource must return bool but Authorizer::index returns Response #299
Comments
Another note: I cannot currently upgrade |
Ugh yeah sorry, this is my fault for doing something in a rush the other day. I can't fix today but I can sort out on Friday afternoon UK time. |
Thanks for this quick answer! I'll look into when it is ready 🎉 |
yeah core change was technically breaking without #298 being merged at the same time 😬 |
So the mistake here was I should never have tagged those changes as I've therefore reverted the changes in the core package and tagged as |
Description
There is currently a bug with
ResourceQuery::authorizeResource()
, which is strict typed to return abool
value.But, if we check the
Authorizer::index()
method (and other methods like it), it can returnbool
orResponse
.Since Laravel default gate always returns a
Response
object, this results in a 500 error.Env
Notes
This is due to the updated
Authorizer
implementation in the core package, which now usesinspect
instead ofcheck
. IMO,ResourceQuery
and any other code which usesAuthorizer
methods should be updated in consequence.The text was updated successfully, but these errors were encountered: