-
Notifications
You must be signed in to change notification settings - Fork 81
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
Overwritten Authorization roles displayed #144
Comments
I didn't realise that the Authorize attributes worked that way. |
Yes it looks like it uses strategy as less restrictive rights applied on class level, and more restrictive to the method.
|
A follow up on this issue, since I'm trying to use the Authorize stuff in my project. There's an implied "hierarchy" in the way the When multiple roles are specified in a single If multiple If an See https://docs.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-6.0#adding-role-checks for further examples and clarification. |
OK, cool. I haven't used this filter in years, so you're welcome to fix it and submit a PR with tests. |
I'm trying to show Authorized roles information in my swagger UI.
Using this kind of structure in my Controller
results to (Auth roles: Admin,Employee, Admin) for first method.
So if my method controller Authorize is overwritten it's not respected, is it possible to fix that without overwriting the logic in controllers. It's really easy to have default one for all the controller and precise if needed in methods.
The text was updated successfully, but these errors were encountered: