-
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
feat: support Illuminate\Auth\Access\Response from authorizer #298
feat: support Illuminate\Auth\Access\Response from authorizer #298
Conversation
@haddowg I've just tagged |
26f46bd
to
8a6b0d3
Compare
@lindyhopchris updated |
@haddowg one final change required, you'll need to swap the |
Actually, might be best to put it to |
ab45f5c
to
76bfdb6
Compare
76bfdb6
to
29b8ac7
Compare
done |
*/ | ||
public function authorizeResource(Authorizer $authorizer): bool | ||
public function authorizeResource(Authorizer $authorizer): bool|Response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is technically breaking. As the method is public
, anyone could be calling it - and if they're relying on it returing a boolean it'll break their implementation.
So I'll need to tag this as a major release.
This PR is dependent on laravel-json-api/core#19 and adds support for gates and policies with Illuminate\Auth\Access\Response return values.
I have not modified the composer.json to pull this branch from core but have tested it with it locally.