: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
fix(data-warehouse): enforce access control on update_schema when no … (#58986)
Felipe Rosa de Almeida5b9795ec72f1
diff --git a/products/data_warehouse/backend/api/table.py b/products/data_warehouse/backend/api/table.pyindex ab65c458a586..8a88adc5632e 100644--- a/products/data_warehouse/backend/api/table.py+++ b/products/data_warehouse/backend/api/table.py@@ -304,11 +304,12 @@ class TableViewSet(TeamAndOrgViewSetMixin, AccessControlViewSetMixin, viewsets.M@action(methods=["POST"], detail=True)def update_schema(self, request: request.Request, *args: Any, **kwargs: Any) -> response.Response:+ table: DataWarehouseTable = self.get_object()+updates = request.data.get("updates", None)if updates is None:return response.Response(status=status.HTTP_200_OK)- table: DataWarehouseTable = self.get_object()if table.external_data_source is not None:return response.Response(status=status.HTTP_400_BAD_REQUEST, data={"message": "The table must be a manually linked table"}