Skip to content

feat(frontend): filter the admin user list by role - #402

Merged
sabinem merged 2 commits into
mainfrom
feat/admin-role-filter
Nov 4, 2026
Merged

sabinem merged 2 commits into
mainfrom
feat/admin-role-filter

Conversation

@sabinem

@sabinem sabinem commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Platform admins: filter users, see their hackathons, change roles safely

As a platform admin, I want to find the people I'm looking for, see which
hackathons they're involved in, and change someone's platform role without being
able to do it by accident.

Users list — /manage/users

Before: one long table with a text search. Each row had a dropdown to grant
a role and a small ✕ to revoke one. Users without a platform role looked as if
they had no role at all, even when they owned hackathons.

After:

  • Filters: All · Admin · Hackathon Organizer · No platform role · Owns a
    hackathon, each with a count. One at a time; the search works on top.
  • An "Owns" column: how many hackathons each user owns.
  • Read-only: a click on a name opens the user's page. Explanations sit behind an
    ⓘ button.

User page — /manage/users/[id] (new)

Before: there was no page per user.

After:

  • Platform role: Change… → pick a role → see what changes for that person →
    confirm. Making someone Admin also requires typing their username. Switching
    between roles is one step. Admins can't change their own role.
  • Hackathons: every hackathon the user owns, takes part in or is waitlisted for,
    with status, dates and owners. A click on the role opens that hackathon's page
    for managing the person.

The ⓘ texts are Markdown files in components/frontend/src/lib/content/help/,
editable without touching components.

Left out

  • Participation counts in the list (needs a backend change).
  • Appointing hackathon owners (no page for it yet).
  • Explanations on other pages still stand on screen.

Adds a chip row to /manage/users — All, Admin, Hackathon Organizer,
No role — each with a count of the users it would show. It combines with
the search, and the count line and empty state name whatever is
narrowing the list.

The matching lives in $lib/utils/globalRole.ts with unit tests. "No role"
means an empty role list, the same test that decides a row gets the
grant picker. Filtering stays client-side: UserService.List already
returns every user.
"No role" was false for most users: they own or take part in hackathons,
which are per-hackathon roles this page doesn't show. The filter chip is
now "No platform role", the column "Platform role", the legend gets a
"Platform roles" heading, and the note under it says hackathon roles are
separate.
@sabinem
sabinem merged commit 969e656 into main Nov 4, 2026
4 checks passed
@sabinem
sabinem deleted the feat/admin-role-filter branch November 4, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant