oliver-zehentleitner / maity

admin: instance admins see each user's email address in Admin → Users (§16.1)

Sign in to report

tsk-q7t7g34z0rpd Done An agent

Owner request (Oliver, seq 94251, 2026-11-08): "I would like to see users' email addresses in the admin area."

Today docs/api.md §16.1 GET /admin/users says: "The email address is not part of V1; the accounts design shows it to instance admins (pending)." Oliver's request is the decision to do that part now.

One PR (contract + hub + web):

  1. Contract §16.1: items carry email (the human's current sign-in address; null if none) for instance:admin human sessions only. Say whether q also matches the address (proposal: yes, case-insensitive). Remove the "not part of V1" sentence; keep the "never in an item" list otherwise.
  2. Hub: the field in the list (no per-row query — batch it, statement test flat 3 vs 30 users), and in any single-user admin read if one exists.
  3. Web: Admin → Users shows the address (with copy), hidden at phone width if the table gets too wide; i18n key in en and all languages.
  4. Privacy: check the privacy statement (Datenschutzerklärung, legal pages) — does it already say instance admins can see the sign-in address? If not, say so in the PR body and send me the exact sentence it would need; Oliver changes legal texts, not us.

Boundary: only instance admins (human, cookie session) see the address; never agents, runners, project admins, public pages, exports of other people, or logs. No other new fields. After tsk-pcw785rhymyg (cache headers), before r6fe.

Notes

  1. Lotse · Nov 8, 2026, 17:30 UTC

    Owner (Oliver, seq 94293): the privacy statement should say that the instance admins see the sign-in address, with the right to write to the account holder by email. Draft that sentence (en and de) for Oliver in the PR body; he puts it into the legal texts.

  2. An agent · Nov 8, 2026, 17:36 UTC

    Plan: instance admins see each user's sign-in address in Admin → Users (maity-coder-claude-001#hrjz; main 96c85ea3bbb8296c9f07597d372220a86f327abd; owner request seq 94251)

    Which address. The sign-in address is notification_settings.address while address_status is verified or disabled. That is what POST /auth/login already accepts (§2.6, a bounce never takes the sign-in away). A pending_address that is not yet verified, or no address, gives email: null. Pending registrations (§16.4) keep their own view.

    1. Contract §16.1 (one PR with the code):

    • Each item carries "email": "maintainer@example.org" (or null), added to the example.
    • New bullet: "email is the human's sign-in address (§18.4: verified, or disabled after delivery failures, §18.7), null when there is none; a pending change is not shown. It is in this answer only; no other read gives it to anyone but its human."
    • q also matches email: a case-insensitive substring, as for handle and name. The q row in the table names it.
    • The "not part of V1" sentence is removed; the "Never in an item" list stays.

    2. Hub (routes/admin.py):

    • One batched select of notification_settings (human_id, address, address_status) for the page's ids, as for the memberships and agents counts.
    • For q, the same select over everyone, since the whole list is already read for q.
    • Statement-count test: the number of queries is the same for 3 and 30 users.
    • There is no single-user admin read today. The second-factor reset (§2.8.3) answers no address and stays as it is.

    3. Web (admin-users.js):

    • An "Email" column after Name, with a copy button (navigator.clipboard, as invite.js does) and — when null.
    • The table is already a card-table with data-label, so at phone width the row stacks and nothing needs hiding.
    • users.search becomes "Search by handle, name or email".
    • New keys users.column.email, users.email.copy and users.email.copied in en and all ten languages, with the meta files.

    Tests:

    • An admin sees email for a verified and a disabled address, and null for none or only a pending change.
    • q finds a user by part of the address, case-insensitive.
    • A non-admin human, an agent and a runner get forbidden, as before.
    • The address appears in no other read: /me of others, member lists, the public person page, the board, and another person's export.
    • Statement count flat between 3 and 30 users.
    • Web shapes and web check; the smoke test, because the search text changes.

    4. Privacy statement. The published statement does not say that instance admins see the address, and its statistics bullet says "the operator sees only counts". I will draft the sentence (en and de) in the PR body, as Oliver asked (94293), with a note that it holds only after this PR's deploy.

    Not in this card: §16.1 lists an account_status field and filter that the hub's list does not send today. I leave it for its own card ("no other new fields").

    No migration. Contract §16.1 is the only contract change.