Skip to content

feat: gate custom branding behind license field (Tier 4.7)#42

Merged
aa-replicated merged 1 commit intomainfrom
demo/tier4
Apr 13, 2026
Merged

feat: gate custom branding behind license field (Tier 4.7)#42
aa-replicated merged 1 commit intomainfrom
demo/tier4

Conversation

@aa-replicated
Copy link
Copy Markdown
Owner

Summary

  • Adds custom_branding_enabled license field gate across the full stack
  • KOTS config screen Branding group is hidden when the license field is absent or false
  • App branding endpoints return 403 when not licensed; UI sections hidden in template

Changes

Layer Change
kots-config.yaml New branding group with site_color item, hidden via group-level when: '{{repl LicenseFieldValue "custom_branding_enabled" | eq "true"}}'
helmchart.yaml siteColor (ConfigOption) and customBrandingEnabled (LicenseFieldValue) passed into Helm values
values.yaml siteColor: "#3B82F6" and customBrandingEnabled: "false" defaults
configmap.yaml / deployment.yaml SITE_COLOR and CUSTOM_BRANDING_ENABLED env vars
config.go SiteColor and CustomBrandingEnabled fields loaded from env
handlers.go CustomBrandingEnabled on PageData (set in pageBase); SiteColor replaces hardcoded #3B82F6 default
admin.go updateBrandingHandler and uploadLogoHandler return 403 when not licensed
admin.html Branding and Logo sections hidden when CustomBrandingEnabled is false

Test plan

  • Deploy with license where custom_branding_enabled is absent/false — Branding group hidden in KOTS config screen, Branding + Logo sections absent from admin panel
  • Update license to set custom_branding_enabled: true, trigger upgrade — Branding group appears in config screen, sections visible in admin panel, branding changes save correctly
  • Confirm POST /admin/branding and POST /admin/logo return 403 when not licensed

Manual step required

Create a custom_branding_enabled license field in the Vendor Portal (type: boolean or string "true"/"false") before testing.

🤖 Generated with Claude Code

Adds a custom_branding_enabled license field gate across the full stack:

- kots-config.yaml: new Branding config group (site_color item) hidden
  via group-level when: condition using LicenseFieldValue
- helmchart.yaml: passes siteColor (ConfigOption) and
  customBrandingEnabled (LicenseFieldValue) into Helm values
- values.yaml: siteColor and customBrandingEnabled defaults
- configmap.yaml / deployment.yaml: site-color and
  custom-branding-enabled env vars wired to the app
- config.go: SiteColor and CustomBrandingEnabled fields loaded from env
- handlers.go: CustomBrandingEnabled on PageData (set in pageBase);
  SiteColor replaces hardcoded #3B82F6 default
- admin.go: updateBrandingHandler and uploadLogoHandler return 403
  when custom branding is not licensed
- admin.html: Branding and Logo sections hidden when not licensed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aa-replicated aa-replicated merged commit 4568856 into main Apr 13, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant