update: 2024.2.2 -> 2024.2.3

Adapted media upload patch.

Flake lock file updates:

• Updated input 'authentik-src':
    'github:goauthentik/authentik/4ec37c52395df6a3b431934cb27771ff814b024c' (2024-03-04)
  → 'github:goauthentik/authentik/6bb180f94ec124092c4f87ae5f5d892a70b32ff3' (2024-04-17)
This commit is contained in:
WilliButz 2024-04-17 14:27:49 +02:00
parent 8be1dcc549
commit 4cdde46347
No known key found for this signature in database
GPG key ID: AB05DF703EB9DC70
3 changed files with 13 additions and 14 deletions

View file

@ -1,12 +1,11 @@
diff --git a/authentik/api/v3/config.py b/authentik/api/v3/config.py
--- a/authentik/api/v3/config.py
+++ b/authentik/api/v3/config.py
@@ -66,7 +66,7 @@ class ConfigView(APIView):
"""Get all capabilities this server instance supports"""
caps = []
deb_test = settings.DEBUG or settings.TEST
- if Path(settings.MEDIA_ROOT).is_mount() or deb_test:
+ if Path(settings.MEDIA_ROOT).is_mount() or CONFIG.get_bool("media.enable_upload") or deb_test:
@@ -71,6 +71,7 @@ class ConfigView(APIView):
if (
CONFIG.get("storage.media.backend", "file") == "s3"
or Path(settings.STORAGES["default"]["OPTIONS"]["location"]).is_mount()
+ or CONFIG.get_bool("media.enable_upload")
or deb_test
):
caps.append(Capabilities.CAN_SAVE_MEDIA)
if GEOIP_READER.enabled:
caps.append(Capabilities.CAN_GEO_IP)