Skip to content
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

ًWhat if i used both Authorized[policy] and Authorized[role] above my controller? #7889

Closed
HaniehRezayi opened this issue Feb 23, 2019 · 3 comments
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question

Comments

@HaniehRezayi
Copy link

I used both Authorized[policy] and Authorized[role] above my controller, i want to know AND statement is happens (between Authorized[policy] and Authorized[Role]) or OR statement.

@rynowak
Copy link
Member

rynowak commented Feb 23, 2019

It depends which version and what compability mode actually. The intention was that policies would always combine as an AND.

However, this was incorrect, and would combine as an OR in ASP.NET Core 1.0, 1.1, and 2.0.

We discovered the problem in 2.1, but because it's a breaking change of behaviour, it is tied to a compatibility switch in 2.1 and 2.2.

In 3.0 multiple policies always combine as an AND.

@rynowak rynowak added question area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels Feb 23, 2019
@HaniehRezayi
Copy link
Author

Thanks for your responses, but when will the new version(3.0) be released?

@rynowak
Copy link
Member

rynowak commented Feb 25, 2019

There are previews available now - https://dotnet.microsoft.com/download/dotnet-core/3.0

I don't have an official release date to share yet.

@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question
Projects
None yet
Development

No branches or pull requests

2 participants