How can I set the policy to grant insertion rights...
# help
n
How can I set the policy to grant insertion rights only to designated users?
s
You can do this by creating a function and use that inside of your policy. It's probably easier to add a role to a user and write the policy based on that, you can see an example in my project here The postgres function https://github.com/silentworks/waiting-list/blob/main/migrations/00003-create_is_admin_function.cjs The policy using the function https://github.com/silentworks/waiting-list/blob/main/migrations/00004-create_rls_policy_profiles.cjs
n
Thank you 🙂