Skip to content

: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.

chore(access-control): expect no current project in the app context without access (#114166)

Lucas Ricoyb2629cfe2ef8
diff --git a/products/access_control/backend/tests/test_access_control.py b/products/access_control/backend/tests/test_access_control.py
index 57e451a4cebe..eee745d608bc 100644
--- a/products/access_control/backend/tests/test_access_control.py
+++ b/products/access_control/backend/tests/test_access_control.py
@@ -1495,8 +1495,7 @@ class TestAccessControlProjectFiltering(BaseAccessControlTest):
self._put_project_access_control_as_admin(self.team.id, {"access_level": "none"})
app_context = self._get_posthog_app_context()
assert len(app_context["current_user"]["organization"]["teams"]) == 2
- assert app_context["current_team"]["id"] == self.team.id
- assert app_context["current_team"]["user_access_level"] == "none"
+ assert app_context["current_team"] is None
# TODO: Add tests to check that a dashboard can't be edited if the user doesn't have access