Hacker News new | ask | show | jobs
by ipodopt 1719 days ago
> For the latter, we've checked out Postgres Foreign Data Wrappers, but they don't seem portable to the cloud hosted services like RDS. We're continuing to look for clever solutions, if anyone reading this bumps into any.

Probably off the mark here but...

View -> Function -> Table (Atomic Permissions) - On Miss -> Rest Call to SpiceDB

RLS:

CREATE POLICY "Resources are updateble by certain groups of users." ON public.resources for UPDATE USING ( EXISTS ( SELECT FROM atomic_permissions_view WHERE (user_id = auth.uid()) and (action_enum = 'modify') and (resource_id = id) ) );

Where resources inherit from resources tables..