-
Notifications
You must be signed in to change notification settings - Fork 142
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
Auth::hasRole(...) => true returns unexpected #32
Comments
It is just a example of return value. Just changed README to avoid confusion. Auth::hasRole('myapp-backend', 'myapp-backend-role1') // true
Auth::hasRole('myapp-frontend', 'myapp-frontend-role1') // true
Auth::hasRole('myapp-backend', 'myapp-frontend-role1') // false |
@robsontenorio Tudo bom? Espero que sim! É complesxo para que funcione com multiplas validações, ex: Auth::hasRole('myapp-backend', 'gestor', 'admin') // true Translated@robsontenorio Everything good? I hope so! It is complex to work with multiple validations, ex: Auth::hasRole('myapp-backend', 'manager', 'admin') // true |
@luizjr you are looking for |
I can try, we'll see if I can |
@robsontenorio I just created a pull request to implement this function. |
@robsontenorio I've updated the pull request, I think it should meet expectations well. |
Thanks for this great solution! It works realy nice. Just have one problem. I tried:
Auth::hasRole('SuperUser') => true
and also insert
use Illuminate\Contracts\Auth\Guard;
But it returned me a syntax error (unexpected '=>' (T_DOUBLE_ARROW).
I am also using realm roles. Is Auth::hasRole checking this, too?
The text was updated successfully, but these errors were encountered: