🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(ui): layout entitlements (#3026)
Marc Klingen1a707fe147a7
diff --git a/web/src/components/layouts/layout.tsx b/web/src/components/layouts/layout.tsxindex 6487f21baa..885d484c93 100644--- a/web/src/components/layouts/layout.tsx+++ b/web/src/components/layouts/layout.tsx@@ -118,6 +118,10 @@ export default function Layout(props: PropsWithChildren) {const uiCustomization = useUiCustomization();+ const cloudAdmin =+ env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined &&+ session.data?.user?.admin === true;+// project info based on projectId in the URLconst { project, organization } = useQueryProjectOrOrganization();@@ -134,7 +138,7 @@ export default function Layout(props: PropsWithChildren) {if (route.featureFlag !== undefined &&!enableExperimentalFeatures &&- session.data?.user?.admin !== true &&+ !cloudAdmin &&session.data?.user?.featureFlags[route.featureFlag] !== true)return null;@@ -143,14 +147,14 @@ export default function Layout(props: PropsWithChildren) {if (route.entitlement !== undefined &&!entitlements.includes(route.entitlement) &&- session.data?.user?.admin !== true+ !cloudAdmin)return null;// RBACif (route.projectRbacScope !== undefined &&- session.data?.user?.admin !== true &&+ !cloudAdmin &&(!project ||!organization ||!hasProjectAccess({