Add global branding config field to control cookie banner default

Introduces a BRANDING boolean config (default true) propagated through
the standard config pipeline. Cookie banners now initialize their
show_branding column from this config instead of hardcoding true.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-22 15:41:11 +04:00
parent 680e60b6e9
commit 4313930ae9
6 changed files with 21 additions and 5 deletions

View File

@@ -207,6 +207,9 @@ func TestBuilder_Build_Defaults(t *testing.T) {
// ESign config
assert.Equal(t, "http://timestamp.digicert.com", cfg.Probod.ESign.TSAURL)
// Branding
assert.True(t, cfg.Probod.Branding)
// No connectors by default
assert.Empty(t, cfg.Probod.Connectors)
}
@@ -280,6 +283,8 @@ func TestBuilder_Build_CustomValues(t *testing.T) {
env["SCIM_BRIDGE_POLL_INTERVAL"] = "60"
// ESign
env["ESIGN_TSA_URL"] = "http://custom.tsa.example.com"
// Branding
env["BRANDING"] = "false"
b := NewBuilder(mockEnv(env))
b.samlCertificate = "test-cert"
@@ -361,6 +366,8 @@ func TestBuilder_Build_CustomValues(t *testing.T) {
assert.Equal(t, 60, cfg.Probod.SCIMBridge.PollInterval)
// ESign
assert.Equal(t, "http://custom.tsa.example.com", cfg.Probod.ESign.TSAURL)
// Branding
assert.False(t, cfg.Probod.Branding)
}
func TestBuilder_Build_SlackConnector(t *testing.T) {