feat(16.3-01): admin:token CLI, party.Activated, READMEs and docs

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-11 01:55:07 +02:00
parent ffdb5d00ca
commit e24e03c47d
22 changed files with 627 additions and 54 deletions

View File

@@ -3,6 +3,11 @@ plugin:
description: A simple blog.
permissions:
access_posts: Manage blog posts
scopes:
blog: Blog
blog_description: Full access to blog admin APIs.
blog_read: Blog (read)
blog_read_description: Read-only access to blog admin APIs.
posts:
title: Posts
post: Post

View File

@@ -0,0 +1,26 @@
package blog
import "git.golem15.com/golem15/summercms/modules/pact"
var _ pact.HasTokenScopes = (*Plugin)(nil)
// TokenScopes registers personal API token scopes for the blog plugin.
func (p *Plugin) TokenScopes() []pact.TokenScope {
all := []string{"GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"}
return []pact.TokenScope{
{
Name: "blog",
Label: "acme.blog::lang.scopes.blog",
Description: "acme.blog::lang.scopes.blog_description",
Permissions: []string{"acme.blog.*"},
Methods: all,
},
{
Name: "blog:read",
Label: "acme.blog::lang.scopes.blog_read",
Description: "acme.blog::lang.scopes.blog_read_description",
Permissions: []string{"acme.blog.*"},
Methods: []string{"GET", "HEAD"},
},
}
}