-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
Enhancement.
It would be great to model RLS policies for Postgres with dbml and generate CREATE POLICY scripts with dbml2sql.
Suggested markup:
Policy {
name 'Users can take all actions on their own accounts'
schema public
table users
behavior permissive
command all
roles [authenticated]
using `auth.uid() = user_id`
check null
}
schema defaults to public if not provided.
behavior can have the values permissive or restrictive. It defaults to permissive if not provided.
command can have the values select, insert, update, delete, or all.
roles accepts a list of roles and defaults to public if none are provided.
using and check default to null if not provided.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels