Repository navigation
feat: reorganize admin UI and add session management - #283
Merged
Merged
Conversation
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.
Goal
Clean up the admin navigation and make sessions manageable:
Changes
Sidebar and pages (webui)
/admin/serverunchanged); the page title and the import page's "Server page" link copy follow, in all 10 locales./admin/uiredirects to/admin/settingsand its nav entry is removed.Session management (backend + webui)
Modeled on authentication activity — one view for users, one for admins:
GET /api/v2/users/me/sessions— the caller's sessions, withcurrentmarking the session the request authenticated with.DELETE /api/v2/users/me/sessions/{id}revokes one; sessions belonging to someone else read as 404.GET /api/v2/users/sessions(admin) — every live session with its owner (userId,email), most recently active first.DELETE /api/v2/users/sessions/{id}kicks one.Authnow carries the caller's session id so endpoints can flagcurrent.GET/DELETE /api/v1/server/sessionsendpoints are removed (the Java version has no such surface; the webui was their only consumer), and the server status page drops its sessions panel.Testing
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo nextest run --workspaceall green — including new endpoint tests covering self scoping, thecurrentflag, the admin owner column, kick, and the 401/403/404 paths.pnpm buildandpnpm lintgreen./admin/uiredirects.Docs: kmworks/website#69 adds the matching
session-managementenhancements page.