Skip to content

feat(environments): team based environments #30773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 132 commits into
base: master
Choose a base branch
from
Draft

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Apr 3, 2025

Problem

Changes

TODO

  • Map /environments to /projects somehow in django land
  • Fix access control to handle if controls exist for a team that is not the same as the root team (where the objects team is not the same as the lookup
  • What happens if you have access to a "project" level but no "sub-projects"
  • Home dashboard is assigned to "current_team" - is this fine?

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

@benjackwhite benjackwhite changed the title feat(environments): Added team for queries feat(environments): Team based environments Apr 3, 2025
@zlwaterfield zlwaterfield changed the title feat(environments): Team based environments feat(environments): team based environments Apr 4, 2025
zlwaterfield and others added 5 commits April 8, 2025 17:54
# Conflicts:
#	frontend/__snapshots__/scenes-app-insights-funnels--funnel-left-to-right-edit--dark.png
#	frontend/__snapshots__/scenes-app-insights-funnels--funnel-left-to-right-edit--light.png
#	frontend/__snapshots__/scenes-app-insights-funnels--funnel-top-to-bottom-edit--dark.png
#	frontend/__snapshots__/scenes-app-insights-funnels--funnel-top-to-bottom-edit--light.png
#	frontend/__snapshots__/scenes-app-web-analytics--web-analytics-dashboard--dark.png
#	frontend/__snapshots__/scenes-app-web-analytics--web-analytics-dashboard--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-project--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-project--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png
#	posthog/api/__init__.py
#	posthog/api/project.py
#	posthog/api/team.py
#	posthog/api/test/__snapshots__/test_decide.ambr
#	posthog/api/test/test_team.py
#	posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

benjackwhite and others added 7 commits April 9, 2025 17:00
# Conflicts:
#	frontend/__snapshots__/posthog-3000-navigation--navigation-base--dark.png
#	frontend/__snapshots__/posthog-3000-navigation--navigation-base--light.png
#	frontend/__snapshots__/scenes-app-insights-trends--trends-area-edit--dark.png
#	frontend/__snapshots__/scenes-app-insights-trends--trends-line-multi-edit--light.png
#	frontend/__snapshots__/scenes-app-persons-groups--persons--dark.png
#	frontend/__snapshots__/scenes-app-persons-groups--persons--light.png
#	frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--light.png
#	frontend/__snapshots__/scenes-app-surveys--surveys-list--dark.png
#	frontend/__snapshots__/scenes-app-surveys--surveys-list--light.png
#	frontend/__snapshots__/scenes-other-org-member-invites--current-user-is-admin--dark.png
#	frontend/__snapshots__/scenes-other-org-member-invites--current-user-is-admin--light.png
#	frontend/__snapshots__/scenes-other-org-member-invites--current-user-is-member--dark.png
#	frontend/__snapshots__/scenes-other-org-member-invites--current-user-is-member--light.png
#	frontend/__snapshots__/scenes-other-org-member-invites--current-user-is-owner--dark.png
#	frontend/__snapshots__/scenes-other-org-member-invites--current-user-is-owner--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-project--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-project--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png
#	frontend/__snapshots__/scenes-other-settings--settings-web-vitals--dark.png
#	frontend/__snapshots__/scenes-other-settings--settings-web-vitals--light.png
#	frontend/src/mocks/handlers.ts
#	frontend/src/scenes/data-management/database/DatabaseTable.tsx
#	frontend/src/scenes/settings/Settings.tsx
#	frontend/src/scenes/surveys/Surveys.tsx
#	posthog/session_recordings/queries/session_recording_list_from_query.py
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

12 snapshot changes in total. 0 added, 12 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 7)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants