zenstackhq / zenstack

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
2.16k stars 88 forks source link

[Feature Request] Add support for Deno #959

Open rkawajan opened 10 months ago

ymc9 commented 10 months ago

Hi @rkawajan , using with Deno is completely untested and I guess it'll require a good amount of work to support. How important is this to you? Do you mind sharing your scenario using ZenStack? Thanks!

rcwestlake commented 8 months ago

Hi @ymc9 I'm not sure what @rkawajan's use-case is but using Supabase as a backend and using their Edge Functions functionality, forces the use of Deno. In that case, is it still possible to use Zenstack / the access policies? Take, for example, an edge function that is called from the FE, does a bunch of backend things, and then inserts/updates into a model. In order to still use the Zenstack access policies, you would need to call an endpoint with an enhanced prisma instance, I'd think?

ymc9 commented 8 months ago

Yes, Supabase function is a good use case. Do you currently use it? I was thinking that Supabase function users will most likely use it together with RLS, although I guess nothing should stop you from using Prisma there 😄.

rcwestlake commented 8 months ago

I haven't gotten to the functions yet - that's come soon. That's interesting... so in a Supabase project (assuming the use of functions), access would need to be defined in two places:schema.zmodel for client-side queries and RLS for functions? Feels like that's duplication and a risk of apply changes in one and not the other.