From e328832374e2c28d5e99ce76eb3ffb34fff281b2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 21:33:58 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=204=20=F0=9F=9F=A1=20(0=20misread);=20repoint=20the=20stale=20?= =?UTF-8?q?/admin=20examples=20and=20the=20plugin-api=20comment,=20fix=20t?= =?UTF-8?q?he=20examples=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/README.md | 2 +- src/http/app.ts | 2 +- src/plugin-host/plugin-api.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/README.md b/examples/README.md index 728e884..313a7c7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -6,6 +6,6 @@ across (or bind-mount your own) and restart. | Path | Copy into | Example of | | --- | --- | --- | | [`plugins/scheduling/`](plugins/scheduling/) | `plugins/scheduling/` | The reference plugin: a list page over an upstream REST service, a CSRF-guarded form that forwards a write, and permission-gated nav — built from the core building blocks, holding no state. Imports the host surface as `@plainpages/plugin-api`. See its [README](plugins/scheduling/README.md) and the [plugin contract](../README.md#building-plugins). | -| [`plugins/auth-admin/`](plugins/auth-admin/) | `plugins/auth-admin/` | The system-admin plugin: the Users / Groups / Permissions / OAuth2-clients screens for running Plainpages itself. A *system* plugin — it administers the Ory identity stack via the privileged [`ctx.system`](../README.md#system-capabilities-the-ctxsystem-surface) surface instead of its own upstream. Copy it in to get a GUI for user & group admin. See its [README](plugins/auth-admin/README.md). | +| [`plugins/auth-admin/`](plugins/auth-admin/) | `plugins/auth-admin/` | The system-admin plugin: the Users / Groups / OAuth2-clients / Plugin-settings screens for running Plainpages itself. A *system* plugin — it administers the Ory identity stack via the privileged [`ctx.system`](../README.md#system-capabilities-the-ctxsystem-surface) surface instead of its own upstream. Copy it in to get a GUI for user & group admin. See its [README](plugins/auth-admin/README.md). | | [`config/menu.ts`](config/menu.ts) | `config/menu.ts` | The central menu override + branding template (rename/group/order/hide nav, set app name/logo/theme). Imports its typed builder as `#menu-config`; `config/` ships empty, so defaults apply until you copy this in. See [The menu system](../README.md#the-menu-system). | | [`shifts-upstream/`](shifts-upstream/) | — (dev service) | A throwaway mock backend the reference plugin reads/writes — stdlib-only, in-memory, no auth. Stands in for your real service so `docker compose up` shows the plugin working out of the box; in production you point `PLUGIN_SETTING_SCHEDULING_UPSTREAM` at the real thing instead. | diff --git a/src/http/app.ts b/src/http/app.ts index 2b84dfa..80bb6c5 100644 --- a/src/http/app.ts +++ b/src/http/app.ts @@ -113,7 +113,7 @@ export function createApp(options: AppOptions = {}): Server { const renderView = renderPluginView({ cache, coreViewsDir: viewsDir, pluginsDir }); // Where the language picker points. Normally the page itself; after a POST that URL may answer no - // GET (POST /admin/users/:id/delete has no GET sibling), so fall back to the page the form was + // GET (POST /auth-admin/users/:id/recovery has no GET sibling), so fall back to the page the form was // submitted from, then to the front page — the picker is on every page, so every link must land. const switchBase = (req: IncomingMessage, url: URL): string => { const method = (req.method ?? "GET").toUpperCase(); diff --git a/src/plugin-host/plugin-api.ts b/src/plugin-host/plugin-api.ts index 5d7e824..86cadd7 100644 --- a/src/plugin-host/plugin-api.ts +++ b/src/plugin-host/plugin-api.ts @@ -37,8 +37,8 @@ export type { PageModel, PaginationModel, PaginationModelOptions } from "../ui/p export { readFormBody } from "../http/body.ts"; export { CSRF_FIELD } from "../auth/csrf.ts"; // System capabilities for a privileged/system plugin (ctx.system) — the Ory admin clients + the -// instant-revoke hook. Undefined unless the host wired them; the built-in admin plugin is the -// reference consumer. The Ory client types + their error classes are re-exported so a system +// instant-revoke hook. Undefined unless the host wired them; the auth-admin example plugin is +// the reference consumer. The Ory client types + their error classes are re-exported so a system // plugin can type against them and `instanceof`-match their errors. See README → System capabilities. export type { SystemCapabilities } from "./system.ts"; export type { Identity, KratosAdmin, RecoveryCode } from "../auth/kratos-admin.ts";