Giter VIP home page Giter VIP logo

Comments (10)

antarasi avatar antarasi commented on August 18, 2024 3

Account seems to be distinguishable enough and independent from actual user purpose (Client, Customer etc)

from loopback-example-access-control.

timotheemoulin avatar timotheemoulin commented on August 18, 2024

Thanks for reporting that ;)

The official documentation tells us to use Customer or Client when overriding the User model.
Moreover, I am not conviced that mixing naming conventions in the example is a good practice.

https://docs.strongloop.com/display/public/LB/Managing+users

from loopback-example-access-control.

superkhau avatar superkhau commented on August 18, 2024

Do you have any suggestions? 👂

from loopback-example-access-control.

timotheemoulin avatar timotheemoulin commented on August 18, 2024

I think that using the same names as in the official documentation Customer, Client would be a good idea. I might highy help people understanding the examples.

from loopback-example-access-control.

superkhau avatar superkhau commented on August 18, 2024

Haha, actually user was the official name before and we added Customer/Client because we had to keep explaining it before, but never got around to updating the examples to match. ;) I think we'll go with Customer because Client will probably cause other issues down the line. Thanks for the feedback.

from loopback-example-access-control.

timotheemoulin avatar timotheemoulin commented on August 18, 2024

Ok I get it.

I don't mind using User twice. That's even what I would have done if
not told otherwise in the doc. What bother me more is that it's once
written in lowercase and the second time with an uppercase U

from loopback-example-access-control.

superkhau avatar superkhau commented on August 18, 2024

No, it has to be lowercase or it will conflict with the builtin User model. That or you can name it something other than "User".

from loopback-example-access-control.

DaGaMs avatar DaGaMs commented on August 18, 2024

the User vs user issue also breaks down if you use mysql as a backend, since it can't distinguish between tables by case.

from loopback-example-access-control.

superkhau avatar superkhau commented on August 18, 2024

Would someone like to submit a PR? I can help with the landing. ;)

from loopback-example-access-control.

csakis avatar csakis commented on August 18, 2024

I addressed this issue in a new PR

from loopback-example-access-control.

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.