This commit is contained in:
Max Peintner
2024-12-27 12:09:16 +01:00
parent ab2136d5ab
commit d8532140bc

View File

@@ -72,7 +72,11 @@ export default async function Page(props: {
const providerType = idpTypeToIdentityProviderType(idp.type);
if (link && options?.isLinkingAllowed) {
if (link) {
if (!options?.isLinkingAllowed) {
return linkingFailed(branding, "Linking is no longer allowed");
}
let idpLink;
try {
idpLink = await addIDPLink(
@@ -155,10 +159,6 @@ export default async function Page(props: {
}
}
if (link) {
return linkingFailed(branding);
}
if (options?.isCreationAllowed && options.isAutoCreation) {
let orgToRegisterOn: string | undefined = organization;