go-cms-authorization

Guides implementation of site-scoped permission and authorization architecture in Go CMS.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/vernal96/go-cms --skill go-cms-authorization-vernal96
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: go-cms-authorization
Source: https://github.com/vernal96/go-cms/tree/main/.codex/skills/go-cms-authorization
Command: npx skills add https://github.com/vernal96/go-cms --skill go-cms-authorization-vernal96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing and enforcing authorization in a multi-site CMS is error-prone: permissions get scattered across handlers, frontend menus become accidental security boundaries, and cached grants go stale. This Skill provides a structured decision framework for implementing users/groups/roles, site-scoped permissions, and enforcement boundaries correctly in the Go CMS codebase. ## Core Features & Use Cases - Permission Model Design: Distinguishes authentication, authorization, visibility, and ownership scope, with explicit guidance on view/edit/delete/create semantics and permission implication rules. - Enforcement Boundary Guidance: Directs checks to authorizer or application-service layers so every transport path is covered, avoiding frontend-only or handler-only authorization. - Cache Coherence & Testing: Covers permission-cache invalidation with fail-closed policy and behavior-driven tests including negative cross-scope cases. - Use Case: When adding a new site-scoped permission (e.g., sites.edit), use this Skill to place the check at the right layer, wire group combination semantics, expose capabilities to the admin UI, and write cross-site denial tests. ## Quick Start Ask the assistant to review or implement a site-scoped permission change in the Go CMS backend using the authorization guidelines.

Frequently Asked Questions about go-cms-authorization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement site-scoped permissions in a Go CMS backend?▼

Site-scoped permissions should be checked with explicit scope, such as Authorize(actor, permission, SiteScope(siteID)), at the authorizer or application-service layer. Never check a generic permission while ignoring which site the target entity belongs to.

Where should authorization checks live in a Go web application?▼

Authorization belongs close to the application or domain operation so every transport path is covered, not only in HTTP handlers, Vue route guards, or menu filtering. Handlers may translate forbidden errors, but reusable operations must enforce policy independently.

Can frontend menu visibility be used as a security boundary?▼

No, hiding menu items or buttons is never a security boundary. The backend must remain authoritative for every operation, while the frontend only uses exposed capability flags like can_edit to render controls.

How do I handle permission cache invalidation after role changes?▼

Use semantic dependency tags so group, role, or site permission mutations immediately invalidate affected cached entries. Never rely on long TTLs for mutable security policy, and fail closed when authoritative permission data cannot be established.

What tests should I write for authorization changes?▼

Write behavior-driven tests covering no-grant denial, view versus edit grant behavior, cross-site denial (site A grant cannot mutate site B), cache freshness after permission changes, and explicit multi-group combination semantics.