Repository navigation
feat(frontend): filter the admin user list by role - #402
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/usersBefore: 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:
hackathon, each with a count. One at a time; the search works on top.
ⓘ button.
User page —
/manage/users/[id](new)Before: there was no page per user.
After:
confirm. Making someone Admin also requires typing their username. Switching
between roles is one step. Admins can't change their own role.
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