Create demo org shell before Queue login redirect.
Deploy Ladill Queue / deploy (push) Successful in 1m19s
Deploy Ladill Queue / deploy (push) Successful in 1m19s
Match Care: guarantee onboarded org on the SSO request path so launcher/login never flashes onboarding during async reseed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,8 +71,13 @@ class DemoSeeder
|
||||
$plan = $this->normalizePlan($plan);
|
||||
$user = $this->resolveUser($identity);
|
||||
|
||||
// Always materialize the onboarded org shell before any wipe so concurrent
|
||||
// SSO redirects never land on the blank onboarding form.
|
||||
$this->ensureOnboardedShell($user, $plan);
|
||||
|
||||
if ($reset) {
|
||||
$this->resetForOwner($user->ownerRef());
|
||||
$this->ensureOnboardedShell($user, $plan);
|
||||
}
|
||||
|
||||
$organization = $this->ensureOrganization($user, $plan);
|
||||
@@ -160,6 +165,19 @@ class DemoSeeder
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure the demo tenant has an onboarded organization + owner member.
|
||||
* Safe to call on the SSO request path before redirecting.
|
||||
*/
|
||||
public function ensureOnboardedShell(User $user, string $plan): Organization
|
||||
{
|
||||
$plan = $this->normalizePlan($plan);
|
||||
$organization = $this->ensureOrganization($user, $plan);
|
||||
$this->assignPlan($organization, $plan);
|
||||
|
||||
return $organization->fresh() ?? $organization;
|
||||
}
|
||||
|
||||
public function resolveUser(string $identity): User
|
||||
{
|
||||
$identity = trim($identity);
|
||||
|
||||
Reference in New Issue
Block a user