-
Notifications
You must be signed in to change notification settings - Fork 132
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
Problem with normalized roles #29
Comments
IIRC the tradeoff was between being surprised by hard to track down runtime errors ... or being annoyed when people look at uppercase. Regardless, annoyance is perception, one that is within your ability to control. This is a wonderful opportunity to see how powerful it can be to prove yourself wrong (prove that you don't have to be annoyed) which is a powerful tool to keep in your toolbelt. I have a bit more about how to change annoyance into at least disinteresting, perhaps even liking: http://www.weshigbee.com/being-happy-without-compromising-when-you-dont-get-your-way/ At first, when I saw what the new API was doing with normalization, I didn't like it either. You can see this in my comments in the code. But, I reminded myself that it works still, so I actually don't mind. |
What I mean is, that it is not consistent. E.g. you introduce a role with AddRoleAsync((new IdentityRole("admin")) and then you cannot use this role name directly. Of course it is best practice to use case invariant string comparisons, but this also a "problem" for debugging or for the UI's in my opionion.. And why is there a normalized name and a normal name? |
The normalized name/email stuff was added in the last update to the framework, I haven't been able to find a reason why. If you want the names unaltered you can query the underlying mongo collection. I designed that GetRolesAsync to plug back into the existing methods which work with a normalized form. I never saw much value in that GetRolesAsync method because it's just firing off a simple query. |
I just uppercased all role names :D |
Hi,
I have a problem with this comment:
The problem is, that my javascript client gets the claims including the role and the role is in upper case. A little bit annoying.
The text was updated successfully, but these errors were encountered: