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:
2026-06-14 12:28:39 +04:00
parent b7145c325b
commit 4dad78aa86
2 changed files with 59 additions and 0 deletions
+24
View File
@@ -137,6 +137,30 @@ export default function Login() {
</button>
)}
</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>
);