mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 21:36:03 +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 (options?.isCreationAllowed && options.isAutoCreation && !link) {
|
||||
if (link) {
|
||||
return linkingFailed(branding);
|
||||
}
|
||||
|
||||
if (options?.isCreationAllowed && options.isAutoCreation) {
|
||||
let orgToRegisterOn: string | undefined = organization;
|
||||
|
||||
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 loginFailed(branding, "No user found");
|
||||
}
|
||||
|
Reference in New Issue
Block a user