Compare commits

..
2 Commits
Author SHA1 Message Date
Hein c7178e0a2b fix(parameters): increase default limit for requests
Tests / Integration Tests (push) Failing after 3m24s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in 4m13s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 3m17s
Build , Vet Test, and Lint / Lint Code (push) Failing after 4m51s
Tests / Unit Tests (push) Failing after 5m23s
Build , Vet Test, and Lint / Build (push) Successful in 4m14s
2026-08-25 15:50:09 +02:00
warkanum 0261f121e8 fix(security): change types for template and hasBlock
Tests / Unit Tests (push) Failing after 19s
Tests / Integration Tests (push) Failing after 30s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Failing after 39s
Build , Vet Test, and Lint / Build (push) Successful in 3m47s
Build , Vet Test, and Lint / Lint Code (push) Successful in 3m45s
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in 3m47s
2026-08-10 20:46:40 +02:00
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func (h *Handler) ParseParameters(r *http.Request) *RequestParameters {
FieldFilters: make(map[string]string), FieldFilters: make(map[string]string),
SearchFilters: make(map[string]string), SearchFilters: make(map[string]string),
SearchOps: make(map[string]FilterOperator), SearchOps: make(map[string]FilterOperator),
Limit: 20, // Default limit Limit: 100000, // Default limit
Offset: 0, // Default offset Offset: 0, // Default offset
ResponseFormat: "simple", // Default format ResponseFormat: "simple", // Default format
ComplexAPI: false, // Default to simple API ComplexAPI: false, // Default to simple API
+4 -4
View File
@@ -924,8 +924,8 @@ func (p *DatabaseRowSecurityProvider) GetRowSecurity(ctx context.Context, userRe
userRef = v.UserID userRef = v.UserID
} }
var template string var template sql.NullString
var hasBlock bool var hasBlock sql.NullBool
runQuery := func() error { runQuery := func() error {
query := fmt.Sprintf(`SELECT p_template, p_block FROM %s($1, $2, $3)`, p.sqlNames.RowSecurity) 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, Schema: schema,
Tablename: table, Tablename: table,
UserID: userRef, UserID: userRef,
Template: template, Template: template.String,
HasBlock: hasBlock, HasBlock: hasBlock.Bool,
}, nil }, nil
} }