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:
@@ -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({
|
||||
|
||||
@@ -162,6 +162,7 @@ const teamSelect = Prisma.validator<Prisma.TeamSelect>()({
|
||||
metadata: true,
|
||||
isOrganization: true,
|
||||
organizationSettings: true,
|
||||
isPlatform: true,
|
||||
});
|
||||
|
||||
export class TeamRepository {
|
||||
|
||||
Reference in New Issue
Block a user