Skip to content

Commit 177efc5

Browse files
committed
[server] Fix setup flow
1 parent b9f99fd commit 177efc5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

components/server/src/user/user-authentication.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { injectable, inject } from "inversify";
88
import { User, Identity, Token, IdentityLookup } from "@gitpod/gitpod-protocol";
9-
import { EmailDomainFilterDB, MaybeUser, UserDB } from "@gitpod/gitpod-db/lib";
9+
import { BUILTIN_INSTLLATION_ADMIN_USER_ID, EmailDomainFilterDB, MaybeUser, UserDB } from "@gitpod/gitpod-db/lib";
1010
import { HostContextProvider } from "../auth/host-context-provider";
1111
import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
1212
import { Config } from "../config";
@@ -214,7 +214,10 @@ export class UserAuthentication {
214214
const isMultiOrgEnabled = await getExperimentsClientForBackend().getValueAsync("enable_multi_org", false, {
215215
gitpodHost: this.config.hostUrl.url.host,
216216
});
217-
return isAllowedToCreateOrganization(user, isDedicated, isMultiOrgEnabled);
217+
return (
218+
isAllowedToCreateOrganization(user, isDedicated, isMultiOrgEnabled) ||
219+
(isDedicated && user.id === BUILTIN_INSTLLATION_ADMIN_USER_ID)
220+
);
218221
}
219222

220223
async isBlocked(params: CheckIsBlockedParams): Promise<boolean> {

0 commit comments

Comments
 (0)