mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-15 05:17:45 +00:00
fix: ordering of conditions
This commit is contained in:
@@ -153,8 +153,11 @@ export default async function Page(props: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if link === true, do not create user
|
if (link) {
|
||||||
if (options?.isCreationAllowed && options.isAutoCreation && !link) {
|
return linkingFailed(branding);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options?.isCreationAllowed && options.isAutoCreation) {
|
||||||
let orgToRegisterOn: string | undefined = organization;
|
let orgToRegisterOn: string | undefined = organization;
|
||||||
|
|
||||||
let userData: AddHumanUserRequest =
|
let userData: AddHumanUserRequest =
|
||||||
@@ -209,10 +212,6 @@ export default async function Page(props: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (link) {
|
|
||||||
return linkingFailed(branding);
|
|
||||||
}
|
|
||||||
|
|
||||||
// return login failed if no linking or creation is allowed and no user was found
|
// return login failed if no linking or creation is allowed and no user was found
|
||||||
return loginFailed(branding, "No user found");
|
return loginFailed(branding, "No user found");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user