Extract ihp-rowlevelsecurity package#2569
Open
mpscholten wants to merge 1 commit intomasterfrom
Open
Conversation
Move hasql-level RLS primitives (statements, sessions, role management, introspection) into a dedicated package with no dependency on ihp core. This makes the RLS building blocks reusable by both ihp and ihp-datasync, and introduces convenience wrappers (withRLS, withRLSPipeline, setRLSConfig) that simplify the existing inline RLS branching. New modules: - IHP.RowLevelSecurity.Types: RowLevelSecurityContext, TableWithRLS - IHP.RowLevelSecurity.Statement: all hasql Statement values - IHP.RowLevelSecurity.Session: withRLS, withRLSPipeline, setRLSConfig - IHP.RowLevelSecurity.Role: ensureAuthenticatedRole, grantPermissions - IHP.RowLevelSecurity.Introspection: ensureRLSEnabled, rlsPolicyColumns + caching Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
ihp-rowlevelsecuritypackage with no dependency onihpcorewithRLS,withRLSPipeline,setRLSConfig) replace inline RLS branching inModelSupport,FetchPipelined, andDataSync.RowLevelSecurityihp-datasyncmodules become thin wrappers that delegate to the new package and add IHP-specific?context/currentUserOrNothinglogicNew package modules
IHP.RowLevelSecurity.TypesRowLevelSecurityContext,TableWithRLSIHP.RowLevelSecurity.StatementsetRLSConfigStatement, pipeline variants,hasRLSEnabledStatement,rlsPolicyColumnsStatement,doesRoleExistStatementIHP.RowLevelSecurity.SessionwithRLS,withRLSPipeline,setRLSConfig,hasRLSEnabledSession,ensureRLSEnabledSessionIHP.RowLevelSecurity.RoleensureAuthenticatedRole,createAuthenticatedRole,grantPermissions,quoteIdentifierIHP.RowLevelSecurity.IntrospectionensureRLSEnabled,makeCachedEnsureRLSEnabled,rlsPolicyColumns,makeCachedRLSPolicyColumnsTest plan
ghci -ignore-dot-ghci)ihp/IHP/ModelSupport.hscompilesihp/IHP/FetchPipelined.hscompilesihp-datasync/IHP/DataSync/RowLevelSecurity.hscompilesihp-datasync/IHP/DataSync/Role.hscompilesihp-datasync/IHP/DataSync/ControllerImpl.hscompilesihp-datasync/IHP/DataSync/Controller.hscompilesihp/IHP/AutoRefresh.hscompiles (useswithRowLevelSecurityDisabled)ihp/IHP/LoginSupport/Helper/Controller.hscompiles🤖 Generated with Claude Code