-
Notifications
You must be signed in to change notification settings - Fork 10.4k
RoleManager.RoleExistsAsync role name normalization issue #35997
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
RoleManager.RoleExistsAsync role name normalization issue #35997
Conversation
… unit test with custom normalizer
There are 3 checks failed one of them required and I'm assuming that this is not expected, the three of them failed for the same reason "a file can not be accessed because it's being used by another process" |
We're having some file contention issues in the CI. I triggered the failed tests to re-run. |
Thanks, for doing this so quickly @faresamr ! |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1191548482 |
I am using 6.0 version, _roleManager.RoleExistsAsync is still not working! throwing TaskCanceledException with message "A task was canceled in Microsoft.EntityFrameworkCore.Relational", but earlier thread about "roleManager.RoleExistsAsync not working" - is marked as closed by [msftbot] bot. |
Hi @aarindam10. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
Yes, I could open an new issue, but I am trying to post on same thread, so people who contributed on this issue, will know what’s going in new version of Identity 6 |
Hi @aarindam10. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
await _roleManager.CreateAsync(role) throws error, but following code executed successfully. _roleManager.CreateAsync(role).GetAwaiter().GetResult() Though the work is carried out, but not convinced why the first line of code is throwing error? not happy! will be waiting for right solution. |
Hi @aarindam10. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
PR Title
RoleManager.RoleExistsAsync role name normalization issue
PR Description
As described in the linked issue, role name gets normalized twice
RoleExistsAsync
, since the value will be passed toFindByNameAsync
and the normalization will be handled there.Normalize(Normalize("foo")) != Normalize("foo")
to cover this case in bothRoleManager
andUserManager
.RoleManager
andUserManager
unit tests to cope with the new normalizer.Fixes #35946