From 0261f121e88242be5c20c35224b91c8abe4b5cf8 Mon Sep 17 00:00:00 2001 From: Hein Date: Mon, 10 Aug 2026 20:46:40 +0200 Subject: [PATCH] fix(security): change types for template and hasBlock --- pkg/security/providers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/security/providers.go b/pkg/security/providers.go index 62097e5..b0c11bb 100644 --- a/pkg/security/providers.go +++ b/pkg/security/providers.go @@ -924,8 +924,8 @@ func (p *DatabaseRowSecurityProvider) GetRowSecurity(ctx context.Context, userRe userRef = v.UserID } - var template string - var hasBlock bool + var template sql.NullString + var hasBlock sql.NullBool runQuery := func() error { query := fmt.Sprintf(`SELECT p_template, p_block FROM %s($1, $2, $3)`, p.sqlNames.RowSecurity) @@ -945,8 +945,8 @@ func (p *DatabaseRowSecurityProvider) GetRowSecurity(ctx context.Context, userRe Schema: schema, Tablename: table, UserID: userRef, - Template: template, - HasBlock: hasBlock, + Template: template.String, + HasBlock: hasBlock.Bool, }, nil }