Giter Site home page Giter Site logo

Comments (5)

kl5331 avatar kl5331 commented on June 29, 2024 1

Sorry for the late reply. I'm pretty new to just about everything so I'm not sure what synchronous entails. Most of my dynamoDB calls(policies for example) are async/await calls that are then stored in their respective type. Also, I just tested the effect and it does in fact work as you stated. Must have been a mishap on my end. Thanks again for the quick response!

from access-control.

SylvainEstevez avatar SylvainEstevez commented on June 29, 2024

Hi @kl5331, the only two possible values for effect are allow or deny. Any other value would not be understood by the condition evaluator hence why the type is forced to this enum.
Iā€™m not sure what you are trying to do? Are you using the memory store with DynamoDB behind it?

from access-control.

SylvainEstevez avatar SylvainEstevez commented on June 29, 2024

Also, which version of typescript are you using?

from access-control.

kl5331 avatar kl5331 commented on June 29, 2024

Thanks for the quick reply! Yes, I am using the memory store with DDB behind it. The version is Version 3.6.3. One solution I was thinking was creating an interface that accepts the DynamoDB data(a policy) and convert the effect:"allow" (because everything is stored as a string, number, object, etc in Dynamo) to effect:PermissionEffect.allow.

Is that the best route?

from access-control.

SylvainEstevez avatar SylvainEstevez commented on June 29, 2024

I can't think of a better way without writing your own class @kl5331. One question for you: is your dynamoDB driver synchronous? I'm surprised to see that you're connecting to a database with the MemoryStore since all of its methods are synchronous.

from 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.