fix: platform orgs shouldn't have org redirect (#16032)

* fix: platform orgs shouldn't have custom domains

* fixup! Merge branch 'main' into no-redirect-for-platform-orgs

* fixup! Merge branch 'main' into no-redirect-for-platform-orgs
This commit is contained in:
Morgan
2024-08-02 20:34:11 +03:00
committed by GitHub
parent 03b97fdb51
commit add59896f5
2 changed files with 6 additions and 0 deletions
@@ -57,6 +57,11 @@ export const createAProfileForAnExistingUser = async ({
const orgUrl = getOrgFullOrigin(orgSlug);
if (org.isPlatform) {
// We don't want redirects for Platform Organizations
return profile;
}
if (user.currentUsername) {
log.debug(`Creating redirect for user ${user.currentUsername} to ${orgUrl}/${usernameInOrg}`);
await prisma.tempOrgRedirect.upsert({
+1
View File
@@ -162,6 +162,7 @@ const teamSelect = Prisma.validator<Prisma.TeamSelect>()({
metadata: true,
isOrganization: true,
organizationSettings: true,
isPlatform: true,
});
export class TeamRepository {