:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
perf(sharing): short-circuit whitelabel feature check (#68840)
Frank Hamand7b75355d7c37
diff --git a/posthog/api/sharing.py b/posthog/api/sharing.pyindex 92bb003db37f..52b9bdfd9e89 100644--- a/posthog/api/sharing.py+++ b/posthog/api/sharing.py@@ -939,8 +939,9 @@ class SharingViewerPageViewSet(mixins.RetrieveModelMixin, viewsets.GenericViewSe}exported_data: dict[str, Any] = {"type": "embed" if embedded else "scene"}- available_features = resource.team.organization.available_product_features or []- if "whitelabel" in request.GET and "white_labelling" in [feature["key"] for feature in available_features]:+ if "whitelabel" in request.GET and resource.team.organization.is_feature_available(+ AvailableFeature.WHITE_LABELLING+ ):exported_data.update({"whitelabel": True})if isinstance(resource, SharingConfiguration) and resource.password_required: