feat(16.3-01): tracer — g15_ token scopes through composite backend guard
- Add pact.TokenScope/HasTokenScopes and bouncer.ScopeLimit on Principal - Append backend_api_tokens migration; Allows evaluates scope before superuser - Composite guard routes Bearer g15_… to token lookup; smoke tests cover path Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -505,6 +505,21 @@ type HasPermissions interface {
|
||||
Permissions() []Permission
|
||||
}
|
||||
|
||||
// TokenScope is one personal API token scope a plugin registers at boot.
|
||||
// Label and Description are phrase keys (containing "::") or literal text.
|
||||
type TokenScope struct {
|
||||
Name string
|
||||
Label string
|
||||
Description string
|
||||
Permissions []string
|
||||
Methods []string
|
||||
}
|
||||
|
||||
// HasTokenScopes is implemented by plugins that declare personal API token scopes.
|
||||
type HasTokenScopes interface {
|
||||
TokenScopes() []TokenScope
|
||||
}
|
||||
|
||||
// NavigationItem is one registerNavigation() entry. Controller is the admin
|
||||
// controller ID; the SPA derives its route from that ID.
|
||||
type NavigationItem struct {
|
||||
|
||||
Reference in New Issue
Block a user