From c8f2de4025ea67b579e66cf608f08a8d35ee4a3c Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 11 Aug 2026 11:50:08 +0200 Subject: feat(hub): Phase 10.1–10.4 — Site overlay + admin/moderation UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Site overlay: landing page, /about, /downloads (dark/light, responsive) - User role column (user/moderator/admin) with config-based admin sync - require_moderator dependency + admin API (8 endpoints: stats, users, groups, audit logs) - Admin SPA panel at #/admin with 5 tabs (stats, users, groups, logs, blocklist) — visible only to moderators/admins - SPA also served at /app/ for Caddy site overlay integration - GET /v1/users/me returns current user role - 15 new tests, 147 total passing Co-Authored-By: Claude Opus 4.6 --- packages/meshbay-hub/src/meshbay_hub/api/users.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'packages/meshbay-hub/src/meshbay_hub/api/users.py') diff --git a/packages/meshbay-hub/src/meshbay_hub/api/users.py b/packages/meshbay-hub/src/meshbay_hub/api/users.py index f91b381..2c2eede 100644 --- a/packages/meshbay-hub/src/meshbay_hub/api/users.py +++ b/packages/meshbay-hub/src/meshbay_hub/api/users.py @@ -236,6 +236,18 @@ async def token_refresh( } +@router.get("/me") +async def get_current_user_info( + current_user: User = Depends(get_current_user), +): + return { + "user_id": current_user.id, + "username": current_user.username, + "role": current_user.role, + "status": current_user.status, + } + + @router.get("/{username}/pubkeys") async def get_user_pubkeys( username: str, -- cgit v1.2.3