Skip to content

Document RBAC requirements for adding new TinaCMS content types #590

@jamiefolsom

Description

@jamiefolsom

When new TinaCMS collections are added to CDP that editors should be able to access (like Posts and Paths), the RBAC system requires specific setup. This should be documented as part of the "add a new collection" checklist.

For editor-accessible collections, add:

  1. `_ownershipNotice` pseudo-field (using `OwnershipNotice` component) as the first field
  2. `creator` object field with `id` and `email` sub-fields (using `Creator` component)
  3. `beforeSubmit` hook with ownership guard (`getUserRole` check) and creator auto-population
  4. Ensure the collection name is NOT in `ADMIN_ONLY_COLLECTIONS` in `tina/role-ui.ts`

For admin-only collections:

  1. Add the collection label to `ADMIN_ONLY_COLLECTIONS` in `tina/role-ui.ts`
  2. No ownership fields needed

See `tina/content/posts.ts` as the reference implementation for editor-accessible collections.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions