Giter VIP home page Giter VIP logo

Comments (4)

g0t4 avatar g0t4 commented on June 27, 2024

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.

from aspnet-identity-mongo.

SebastianStehle avatar SebastianStehle commented on June 27, 2024

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?

from aspnet-identity-mongo.

g0t4 avatar g0t4 commented on June 27, 2024

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.

from aspnet-identity-mongo.

SebastianStehle avatar SebastianStehle commented on June 27, 2024

I just uppercased all role names :D

from aspnet-identity-mongo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.