sourcegraph/sourcegraph-public-snapshot

Redirect user to "/cody/manage" when admin removes themself from the team

taras-yemets opened this issue · 0 comments

When the admin removes themself from the team they transition to the free plan. As they are no longer on a team, they should be redirected from any team-specific page like "/cody/team/manage".

Meta point: any page intended for Pro plan users should ensure the user is on a Pro plan. The plan data should be updated if any mutation can modify the user-team relation.

Technical challenge: user plan data comes from the Sourcegraph instance backend (GraphQL) and the source of truth for teams is on the SSC backend. We need to find a way to refetch user Cody plan after any mutation (in other words sync Apollo hooks with React Query ones).