Skip to content

TypeScript API / laikacms/auth / GRANULAR_SCOPES

Variable: GRANULAR_SCOPES ​

ts
const GRANULAR_SCOPES: readonly ["content:read", "content:write", "media:read", "media:write", "config:read"];

Open resource:action scope vocabulary for CMS-issued credentials (OAuth sessions and PATs). CMS-agnostic mechanism: the granular scopes below are shipped defaults, but the vocabulary is open, a consumer may grant its own namespaced scopes (e.g. shipping:read). This is the single source of the scope primitives; adapters (@laikacms/server/api) layer their own vocabulary + policy on top, and decap-cms keeps a types-only copy for its admin UI.

Wildcards:

  • admin (and the equivalent *) grant every scope.
  • resource:* grants every action on that resource (e.g. content:*).

Released under the MIT License.