Rename the plugin-API permission gate to role

This commit is contained in:
2026-08-03 11:31:04 +02:00
parent 702e42de09
commit acce2d2556
32 changed files with 122 additions and 122 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ function readUserInput(form: URLSearchParams): UserInput {
// the Kratos capability (else a themed 503). Each route below is a thin handler over these.
interface UsersDeps { ctx: RequestContext; kratosAdmin: KratosAdmin; revoke: ((sub: string) => void) | undefined; user: User; }
// Resolve the shared deps, then run `inner`. The route's `permission: "admin"` already gated at the
// Resolve the shared deps, then run `inner`. The route's `role: "admin"` already gated at the
// host; `requireAdmin` is defence-in-depth and yields the user. GuardError (auth/CSRF) → host maps it.
function withUser(inner: (deps: UsersDeps) => Promise<RouteResult>): RouteHandler {
return async (ctx) => {