-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
authorizeResource does not work for models with compound names #18432
Comments
Just submitted a PR that should fix the issue. Looks like the "authorizesResource" method was calling "strtolower" on the base_class of the model. Calling "lcfirst" should fix it.
|
Your tip of passing the variable's compound name as the second argument saved the day! |
ghost
mentioned this issue
Oct 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
authorizeResource
does not seem to work for models with more than 1 part to its name.Steps To Reproduce:
here's a quick demo app in which you can see
authorizeResource
works fine for thePost
model, but not for theCompoundName
model.This
show
method will always return unauthorized:However, explicit authorization works fine as expected:
The text was updated successfully, but these errors were encountered: