feat(36-01): add EN/PL scope picker phrasebook copy, regenerate OpenAPI/TS schema, and update docs

This commit is contained in:
Jakub Zych
2026-11-24 19:32:59 +01:00
parent ca7980ef54
commit c8985af874
9 changed files with 127 additions and 7 deletions

View File

@@ -96,7 +96,7 @@ Each token holds one or more scopes chosen at creation. The framework registers
| `*` | every method | Acts as the owner with no further scope limit. |
| `admin:read` | GET, HEAD | Acts as the owner on read methods only. |
Plugins declare more scopes with `pact.HasTokenScopes`. Boot fails on a duplicate name, a reserved name (`*`, `admin`, `admin:…`), an invalid name, empty permissions or methods, an unknown method, a method list without GET, an unknown permission pattern, or a label or description phrase key that does not resolve:
Plugins declare more scopes with `pact.HasTokenScopes`. Boot fails on a duplicate name, a reserved name (`*`, `admin`, `admin:…`), an invalid name, empty permissions or methods, an unknown method, a method list without GET, an unknown permission pattern, or a label, description or optional `Group` phrase key (containing `::`) that does not resolve. Each advertised `cabana.AdminAPITokenScope` also carries always-present `plugin_id` and `group` strings: framework scopes (`*`, `admin:read`) and unknown stored scopes emit empty strings, while plugin scopes resolve `group` from `Group`, else `<pluginID>::lang.plugin.name`, else the unanimous non-empty `Tab` of matched permissions, else the raw plugin ID:
```go src=docs/examples/blog/token_scopes.go#Plugin.TokenScopes
// TokenScopes registers personal API token scopes for the blog plugin.