Giter VIP home page Giter VIP logo

Comments (9)

Pavel910 avatar Pavel910 commented on August 16, 2024 1

That would be nice 👍

from docs.webiny.com.

adrians5j avatar adrians5j commented on August 16, 2024

Not sure what you were aiming at here but both components are very necessary. 🙂

from docs.webiny.com.

Pavel910 avatar Pavel910 commented on August 16, 2024

Actually it was me aiming at it :D Those components are 90% the same, so I was wondering if we can get away with making it into 1 component. If it's really necessary to have 2 components, let's leave it as is.

But, do we need to have roles prop?

from docs.webiny.com.

adrians5j avatar adrians5j commented on August 16, 2024

Roles - no.

Those are completely removed, only scopes are relevant now.

from docs.webiny.com.

adrians5j avatar adrians5j commented on August 16, 2024

Regarding components, if you ask me, I would leave it.

SecureRoute, as you've probably seen, will render a not-authorized error message, which can be customized via a plugin. With it, you only wrap the route, and fallback render happens automatically, no need to handle it for every route with own code.

And SecureView is just for rendering/not-rendering parts of the UI (so by default, there is no fallback render). We use it in menus components for example, to render/not-render menu items accordingly.

from docs.webiny.com.

adrians5j avatar adrians5j commented on August 16, 2024

BTW guys, there is this PR that removes usage of roles prop in the docs articles:

#31

I can merge into next branch.

from docs.webiny.com.

adrians5j avatar adrians5j commented on August 16, 2024

Although, I noticed a few things here that are incorrect (didn't do a review after final changes were made).

Anyways, I'll take a look and merge it.

from docs.webiny.com.

adrians5j avatar adrians5j commented on August 16, 2024

ℹī¸ Merged (next branch) and fixed content in the following articles:

  • /docs/webiny-apps/security/development/app/components/secure-view
  • /docs/webiny-apps/security/development/app/components/secure-route
  • /docs/webiny-apps/security/development/api/graphql-helpers/has-scope

from docs.webiny.com.

EmilK15 avatar EmilK15 commented on August 16, 2024

Adrian already resolved this issue, so I'll close this.

from docs.webiny.com.

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.