fix: Cannot sign-in to invited account in self-hosted using email. closes #6902
This commit is contained in:
@@ -3,7 +3,6 @@ import env from "@server/env";
|
|||||||
import {
|
import {
|
||||||
DomainNotAllowedError,
|
DomainNotAllowedError,
|
||||||
InvalidAuthenticationError,
|
InvalidAuthenticationError,
|
||||||
MaximumTeamsError,
|
|
||||||
TeamPendingDeletionError,
|
TeamPendingDeletionError,
|
||||||
} from "@server/errors";
|
} from "@server/errors";
|
||||||
import { traceFunction } from "@server/logging/tracing";
|
import { traceFunction } from "@server/logging/tracing";
|
||||||
@@ -107,7 +106,7 @@ async function teamProvisioner({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (team) {
|
if (team) {
|
||||||
throw MaximumTeamsError();
|
throw InvalidAuthenticationError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,14 +141,6 @@ export function OAuthStateMismatchError(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function MaximumTeamsError(
|
|
||||||
message = "The maximum number of workspaces has been reached"
|
|
||||||
) {
|
|
||||||
return httpErrors(400, message, {
|
|
||||||
id: "maximum_reached",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TeamPendingDeletionError(
|
export function TeamPendingDeletionError(
|
||||||
message = "The workspace is pending deletion"
|
message = "The workspace is pending deletion"
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user