Add excluded flag to cookie pattern model

Adds an `excluded` boolean column to the cookie_patterns table
so operators can mark patterns to be omitted from the consent
banner without deleting them. Includes the migration, struct
field, updated SQL queries, and filter support.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-01 16:19:17 +04:00
parent 8e5c586c95
commit 2192c854a0
4 changed files with 49 additions and 2 deletions

View File

@@ -304,7 +304,7 @@ func (h *patternAnalysisHandler) adoptUncategorisedPatterns(
tx,
scope,
banner.ID,
coredata.NewCookiePatternFilter(&prefixMatchType, nil),
coredata.NewCookiePatternFilter(&prefixMatchType, nil, nil),
); err != nil {
return false, fmt.Errorf("cannot load prefix patterns: %w", err)
}
@@ -324,7 +324,7 @@ func (h *patternAnalysisHandler) adoptUncategorisedPatterns(
tx,
scope,
banner.ID,
coredata.NewCookiePatternFilter(&exactMatchType, &uncategorised.ID),
coredata.NewCookiePatternFilter(&exactMatchType, &uncategorised.ID, nil),
); err != nil {
return false, fmt.Errorf("cannot load uncategorised exact patterns: %w", err)
}