Skip to content

feat(admin): menus + sessions UI + impersonation + privacy + plugin admin pages - #491

Merged
tayebmokni merged 5 commits into
mainfrom
feat/admin-final-polish
May 26, 2026
Merged

feat(admin): menus + sessions UI + impersonation + privacy + plugin admin pages#491
tayebmokni merged 5 commits into
mainfrom
feat/admin-final-polish

Conversation

@tayebmokni

Copy link
Copy Markdown
Contributor

Closes #54, #205, #211, #225, #228.

@tayebmokni
tayebmokni enabled auto-merge (squash) May 26, 2026 22:09
tib0o0o and others added 5 commits May 27, 2026 00:11
Add navigation menus surface — a `menus` + `menu_items` schema with
dot-separated ltree-style paths, a goroutine-safe Store
(Memory + Pgx), the /api/v1/admin/menus REST routes gated by
manage_themes, an Admin UI at /appearance/menus with drag-to-reorder,
and a core/navigation block renderer that resolves menu_id to items
through a MenuResolver injected on the render Context.

Closes #54.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
Wire the existing GET/DELETE /api/v1/auth/sessions backend into a
Settings → Sessions page. Lists each live session with device label,
IP, created/last-seen stamps. Per-row Revoke button revokes a single
session via DELETE /sessions/{id}; "Sign out of all other devices"
hits DELETE /sessions (the server scopes the bulk delete to the
non-current set). Both flows update optimistically and revert on
ApiError.

Closes #205.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
Add POST /api/v1/admin/users/{id}/impersonate (gated to
super_admin) that mints a session as the target user and stamps an
`impersonation` flag, the actor user ID, and the actor's original
session token into the session data. A companion
GET/DELETE /api/v1/auth/impersonation pair surfaces the banner
state and tears the impersonation down (restoring the actor's
original cookie). On the frontend the authenticated layout renders
<ImpersonationBanner> at the top of every authenticated surface;
<ImpersonateButton> can be dropped onto user detail pages. Every
start emits an audit event with both actor and target pinned.

Closes #211.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
Add a privacy-group seed to the settings registry covering cookie
policy URL/text, audit/sessions/login-attempts retention windows,
and the GDPR self-service toggle. Wire a Settings → Privacy page
that PATCHes through the existing registry endpoint. The
POST /api/v1/account/data/export route reads the toggle on every
request — when an operator flips it off the endpoint returns 403
with code "gdpr_disabled", and the producer is never invoked.

Closes #225.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
…228)

Extend the gonext.io/v1 plugin manifest with an admin_pages array
(slug + label + optional icon + optional capability), expose
GET /api/v1/admin/plugin-pages that flattens admin_pages across
every active plugin's manifest, and render a "Plugins" sidebar
section that fetches it at runtime. The catch-all route
/plugins/{plugin}/{slug} hosts the plugin's frontend module via a
dynamic-import bridge to the (out-of-tree) plugin frontend host —
when the host isn't bundled the bridge falls back to a "no module
registered" placeholder so the route still renders.

Closes #228.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
@tayebmokni
tayebmokni force-pushed the feat/admin-final-polish branch from 4ef39cc to 33f0f9c Compare May 26, 2026 22:14
@tayebmokni
tayebmokni merged commit 6189d56 into main May 26, 2026
7 of 11 checks passed
@tayebmokni
tayebmokni deleted the feat/admin-final-polish branch May 26, 2026 22:14
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.

Menus data model + admin builder + rendering

2 participants