-
Notifications
You must be signed in to change notification settings - Fork 6
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
PermissionEffect type conflict #26
Comments
Hi @kl5331, the only two possible values for |
Also, which version of typescript are you using? |
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? |
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. |
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! |
In most of your examples, I see "effect: 'allow'" when creating a new permission. I.E
But when I'm coding, TypeScript gives an error since I am not using PermissionEffect.allow. I have created a working database interface(dynamodb) but it relies on strings mostly. Is there a way to add policies with "effect: string"?
The text was updated successfully, but these errors were encountered: