From ca56ae87c21819aa569c5fc32e159673453c08ef Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 3 Aug 2026 11:31:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(backend)=20expose=20the=20default=20r?= =?UTF-8?q?oom=20access=20level=20in=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expose the default access level for rooms in the backend settings response, so the frontend can initialize the global room preferences UI with the current default value. --- src/backend/core/api/__init__.py | 3 +++ src/frontend/src/api/useConfig.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/backend/core/api/__init__.py b/src/backend/core/api/__init__.py index f9460024..b343dbd4 100644 --- a/src/backend/core/api/__init__.py +++ b/src/backend/core/api/__init__.py @@ -61,6 +61,9 @@ def get_frontend_configuration(request): ], }, "telephony": build_telephony_config(), + "resource": { + "default_access_level": settings.RESOURCE_DEFAULT_ACCESS_LEVEL, + }, "subtitle": {"enabled": settings.ROOM_SUBTITLE_ENABLED}, "livekit": { "url": settings.LIVEKIT_CONFIGURATION["url"], diff --git a/src/frontend/src/api/useConfig.ts b/src/frontend/src/api/useConfig.ts index 8e1ffe83..9ebb60f5 100644 --- a/src/frontend/src/api/useConfig.ts +++ b/src/frontend/src/api/useConfig.ts @@ -2,6 +2,7 @@ import { fetchApi } from './fetchApi' import { keys } from './queryKeys' import { useQuery } from '@tanstack/react-query' import { RecordingMode } from '@/features/recording' +import type { ApiAccessLevel } from '@/features/rooms/api/ApiRoom' import type { Track } from 'livekit-client' type Source = Track.Source @@ -49,6 +50,9 @@ export interface ApiConfig { international_phone_number?: string default_country?: string } + resource?: { + default_access_level?: ApiAccessLevel + } manifest_link?: string livekit: { url: string