fix(dashboard): staff sign in directly, and old history entries read as people #426

Merged
sharang merged 1 commits from fix/staff-sign-in into main 2026-09-29 08:23:36 +00:00
Owner

Why

Found while testing support access (#425) on staging:

  • Staff couldn't sign in to Prüfwerk directly. Only signing in to the portal first worked, because the portal's staff sign-in sends kc_idp_hint.
  • History entries from before #425 showed the raw user UUID.

What

  • /auth/staff:
    • starts the Keycloak sign-in with kc_idp_hint = STAFF_IDP_HINT, the same variable and value as the portal (breakpilot on stage);
    • without the variable it is the ordinary sign-in;
    • needs STAFF_IDP_HINT in orca-platform services/pruefwerk-stage/service.toml (separate orca PR).
  • History fallback:
    • the reader's own old changes show their name;
    • other old changes show "Benutzer 1a2b3c4d";
    • new changes carry by_name since #425.

Tests

  • changed_by: recorded name, own old change, someone else's old change (DE/EN)
  • dashboard suite; clippy (server + web) with the CI flags; fmt

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

## Why Found while testing support access (#425) on staging: - Staff couldn't sign in to Prüfwerk directly. Only signing in to the portal first worked, because the portal's staff sign-in sends `kc_idp_hint`. - History entries from before #425 showed the raw user UUID. ## What - **`/auth/staff`:** - starts the Keycloak sign-in with `kc_idp_hint = STAFF_IDP_HINT`, the same variable and value as the portal (`breakpilot` on stage); - without the variable it is the ordinary sign-in; - needs `STAFF_IDP_HINT` in orca-platform `services/pruefwerk-stage/service.toml` (separate orca PR). - **History fallback:** - the reader's own old changes show their name; - other old changes show "Benutzer 1a2b3c4d"; - new changes carry `by_name` since #425. ## Tests - `changed_by`: recorded name, own old change, someone else's old change (DE/EN) - dashboard suite; clippy (server + web) with the CI flags; fmt 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-29 08:13:57 +00:00
fix(dashboard): staff sign in directly, and old history entries read as people
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m6s
a3f57fc184
- GET /auth/staff starts the sign-in with kc_idp_hint = STAFF_IDP_HINT,
  straight to the company login, as the portal's staff sign-in does. The
  realm's own login form does not offer it, so staff could only reach
  Prüfwerk after signing in to the portal first.
- Status changes from before names were recorded carry only a user id:
  the reader's own now shows their name, anyone else's "Benutzer" and the
  first eight characters of the id.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit ec5a68a982 into main 2026-09-29 08:23:36 +00:00
Sign in to join this conversation.