feat(login): three real EA2-seeded personas as quick-switch chips
Seeded HR/CEO/IT directors as real superuser rows in auth_service.user via auth-service POST /api/v1/auth/register + a one-shot SQL promotion to is_superuser=TRUE so dev-login resolves them: ceo-head@flow-master.ai → Mariana Cole (Chief Executive) hr-head@flow-master.ai → Aisha Khan (HR Director) it-head@flow-master.ai → Rohan Patel (IT Director) Login page exposes them as three QUICK PERSONA chips that prefill the operator-id field; clicking SIGN IN AS DEVELOPER then issues a real JWT for that persona. No mock users.
This commit is contained in:
@@ -1296,6 +1296,41 @@ select.studio-input { background: var(--bp-paper); }
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
.login-personas {
|
||||||
|
margin-top: 24px;
|
||||||
|
padding-top: 16px;
|
||||||
|
border-top: 1px solid var(--bp-navy);
|
||||||
|
border-top-color: color-mix(in srgb, var(--bp-navy) 20%, transparent);
|
||||||
|
}
|
||||||
|
.login-persona-label {
|
||||||
|
font-family: var(--bp-mono);
|
||||||
|
font-size: 10px;
|
||||||
|
letter-spacing: 0.1em;
|
||||||
|
color: var(--bp-muted);
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.login-persona-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.persona-chip {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
padding: 6px 10px;
|
||||||
|
background: var(--bp-paper);
|
||||||
|
border: 1px solid var(--bp-navy);
|
||||||
|
color: var(--bp-navy);
|
||||||
|
font-family: var(--bp-mono);
|
||||||
|
font-size: 10px;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.1s;
|
||||||
|
}
|
||||||
|
.persona-chip:hover:not(:disabled) {
|
||||||
|
background: var(--bp-amber);
|
||||||
|
color: var(--bp-paper);
|
||||||
|
}
|
||||||
|
.persona-chip:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||||
.sso-btn {
|
.sso-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -137,6 +137,30 @@ export default function Login() {
|
|||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{devLoginEnabled && (
|
||||||
|
<div className="login-personas">
|
||||||
|
<div className="login-persona-label">QUICK PERSONA</div>
|
||||||
|
<div className="login-persona-row">
|
||||||
|
{[
|
||||||
|
{ key: "ceo", email: "ceo-head@flow-master.ai", title: "Mariana Cole · CEO" },
|
||||||
|
{ key: "hr", email: "hr-head@flow-master.ai", title: "Aisha Khan · HR" },
|
||||||
|
{ key: "it", email: "it-head@flow-master.ai", title: "Rohan Patel · IT" },
|
||||||
|
].map((p) => (
|
||||||
|
<button
|
||||||
|
key={p.key}
|
||||||
|
type="button"
|
||||||
|
className="persona-chip"
|
||||||
|
onClick={() => setEmail(p.email)}
|
||||||
|
disabled={loading}
|
||||||
|
title={p.email}
|
||||||
|
>
|
||||||
|
{p.title}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user