Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply RLS policy to all users (not just the current role)
Rails schema/migrations should be isolated from the upper user/role layer. Leverage the BYPASS RLS flag so we can connect with a admin user (or database owner) which by default bypasses rls (for migrations etc.), but all other roles should be subject to the RLS policy. Tables should not be hardwired to a specific role within postgres, otherwise we get exceptions such as `role "koleo_rls" cannot be dropped because some objects depend on it` when trying to drop the role (messy).
- Loading branch information