Repository navigation
feat: add read access functionality - #24
Merged
Merged
Conversation
[High impact] The PR appears safe to merge; the previous coverage gap is addressed and no new actionable issues were found. SummaryAdds
Reviews (2) · Last reviewed commit: "add some test..." · Reviewed by Greptile |
Contributor
Author
|
@greptileai review |
pascal-botpress
approved these changes
Oct 20, 2026
| GRANT USAGE ON SCHEMA ${schema} TO ${role}; | ||
| GRANT SELECT ON ALL TABLES IN SCHEMA ${schema} TO ${role}; | ||
| ALTER DEFAULT PRIVILEGES FOR ROLE ${creators} IN SCHEMA ${schema} GRANT SELECT ON TABLES TO ${role}; | ||
| ${bypass ? `ALTER ROLE ${role} BYPASSRLS;` : ""} |
Member
There was a problem hiding this comment.
quibble: setting to false is a no-op, and the correct way to remove it is to set NOBYPASSRLS. I don't see why we'd be removing it, but if we do, we'll have to manually change it in the db.
Contributor
Author
There was a problem hiding this comment.
The goal of this was to had the bypass or leave it to the default
but you're right it can be counterintuitive, I juste renamed the option to grantBypassRls instead of bypassRls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a ReadAccess construct for existing and future PostgreSQL tables, with optional RLS bypass. Grants are additive and retained on removal.