mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 04:26:33 +00:00
Skip adding users if no email service
This commit is contained in:
@@ -71,11 +71,17 @@ export default function SignUp() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// when email service is not configured, skip step 2
|
// when email service is not configured, skip step 2 and 5
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!serverDetails?.emailConfigured && step === 2){
|
if (!serverDetails?.emailConfigured && step === 2){
|
||||||
incrementStep()
|
incrementStep()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!serverDetails?.emailConfigured && step === 5){
|
||||||
|
getWorkspaces().then((userWorkspaces)=>{
|
||||||
|
router.push(`/dashboard/${userWorkspaces[0]._id}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
}, [step]);
|
}, [step]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -121,9 +127,7 @@ export default function SignUp() {
|
|||||||
password={password}
|
password={password}
|
||||||
name={`${firstName} ${lastName}`}
|
name={`${firstName} ${lastName}`}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (serverDetails?.emailConfigured ? <TeamInviteStep /> : "")}
|
||||||
<TeamInviteStep />
|
|
||||||
)}
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user