Skip to content

Commit 5f9a854

Browse files
authored
[server] allow members to leave (#16796)
* [server] allow members to leave * [dashboard] fix login
1 parent ef7eceb commit 5f9a854

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

components/dashboard/src/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const App: FunctionComponent = () => {
2424
// Setup analytics/tracking
2525
useAnalyticsTracking();
2626

27-
if (loading || currentOrgQuery.isLoading) {
27+
if (loading) {
2828
return <AppLoading />;
2929
}
3030

@@ -51,6 +51,9 @@ const App: FunctionComponent = () => {
5151
if (!user) {
5252
return <Login />;
5353
}
54+
if (currentOrgQuery.isLoading) {
55+
return <AppLoading />;
56+
}
5457

5558
// If we made it here, we have a logged in user w/ their teams. Yay.
5659
return (

components/server/src/workspace/gitpod-server-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
23592359
// The user is leaving a team, if they are removing themselves from the team.
23602360
const userLeavingTeam = user.id === userId;
23612361

2362-
if (userLeavingTeam) {
2362+
if (!userLeavingTeam) {
23632363
await this.guardTeamOperation(teamId, "update", "not_implemented");
23642364
} else {
23652365
await this.guardTeamOperation(teamId, "get", "org_members_write");

0 commit comments

Comments
 (0)