admin/files: add centralized theme variable support for file URLs#19657
admin/files: add centralized theme variable support for file URLs#19657
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19657 +/- ##
==========================================
+ Coverage 93.22% 93.26% +0.04%
==========================================
Files 954 954
Lines 52401 52577 +176
==========================================
+ Hits 48849 49038 +189
+ Misses 3552 3539 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fab52f7 to
d2c4e51
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-e1bc878ea2c2ee04ad9a941f680a907a754b56ab
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-e1bc878ea2c2ee04ad9a941f680a907a754b56abAfterwards, run the upgrade commands from the latest release notes. |
d2c4e51 to
df1aa01
Compare
Overview: Adds support for `%(theme)s` placeholder in file paths, which allows theme-specific assets (like logos, backgrounds, icons) to be served based on the user's current theme (light/dark). This replaces the previous implementation (reverted in this PR) which only handled theme substitution in the Go file backend and instead uses the new approach which centralizes theme logic and works across both backends. Testing: Try out the following for the file and s3 backend: * Ensure themed images load * Ensure non-themed images load Motivation: Internal
.xyz is a known MIME type for chemical/molecular structure files
398d20c to
e1bc878
Compare
kensternberg-authentik
left a comment
There was a problem hiding this comment.
I don't see anything radically broken on the front-end. I just wonder if we have documentation that describes all of these ways that logos and such get into the product.
| } | ||
|
|
||
| public get brandingLogoThemedUrls(): ThemedUrls | null | undefined { | ||
| return this.brand.brandingLogoThemedUrls; |
There was a problem hiding this comment.
null | undefined is a bit of a code smell. Can you pick one or the other, and prefer null?
|
|
…erry-pick #19657 to version-2025.12) (#19793) * Cherry-pick #19657 to version-2025.12 (with conflicts) This cherry-pick has conflicts that need manual resolution. Original PR: #19657 Original commit: 33594c9 * fix conflict Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Dominic R <dominic@sdko.org> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
* main: (45 commits) sources/saml: Add testcases for PR #19593 (#19647) revert: website/integrations: wazuh: Change exchange key generation to 64 bytes (#19759) web: bump API Client version (#19760) core: bump djangoql from 0.18.2 to 0.19.1 (#19780) web: Vendor SFE Bootstrap (#19766) core, web: update translations (#19717) web: bump the eslint group across 1 directory with 3 updates (#19782) web: bump the react group across 1 directory with 2 updates (#19784) web: bump country-flag-icons from 1.6.8 to 1.6.9 in /web (#19785) providers/oauth2: Support login_hint (#19498) admin/files: add centralized theme variable support for file URLs (#19657) core: bump github.com/pires/go-proxyproto from 0.9.1 to 0.9.2 (#19778) core: bump openapitools/openapi-diff from 2.1.6 to 2.1.7 in /scripts/api (#19779) core: bump gssapi from 1.10.1 to 1.11.1 (#19781) ci: bump actions/attest-build-provenance from 3.1.0 to 3.2.0 (#19783) website/docs: endpoint devices: fix local device login (#19698) web: Enforce `challenge` nullish types. (#19768) web/elements: stabilize dual-select status height (#19734) web/a11y: CAPTCHA Stage Form (#19670) web/table: align row action icons and tooltip color (#19736) ...
In 15c4de7 ("admin/files: add centralized theme variable support for file URLs (cherry-pick goauthentik#19657 to version-2025.12) (goauthentik#19793)") the frontend side replacement was removed in favor of handling the replacement in the media backend. Unfortunately, this does not seem to work in our setup, as the logo URL containing "%(theme)s" started to be served without any replacement after the update. This might be a bug, but needs more investigation and, if needed, an upstream report. Until then, as a temporary hotfix, restore the frontend/JS based replacement. Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
Overview:
Adds support for
%(theme)splaceholder in file paths, which allows theme-specific assets (like logos, backgrounds, icons) to be served based on the user's current theme (light/dark).This replaces the previous implementation (reverted in this PR) which only handled theme substitution in the Go file backend and instead uses the new approach which centralizes theme logic and works across both backends.
Testing:
Try out the following for the file and s3 backend:
Motivation:
Internal