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:
- `_ownershipNotice` pseudo-field (using `OwnershipNotice` component) as the first field
- `creator` object field with `id` and `email` sub-fields (using `Creator` component)
- `beforeSubmit` hook with ownership guard (`getUserRole` check) and creator auto-population
- Ensure the collection name is NOT in `ADMIN_ONLY_COLLECTIONS` in `tina/role-ui.ts`
For admin-only collections:
- Add the collection label to `ADMIN_ONLY_COLLECTIONS` in `tina/role-ui.ts`
- No ownership fields needed
See `tina/content/posts.ts` as the reference implementation for editor-accessible collections.
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:
For admin-only collections:
See `tina/content/posts.ts` as the reference implementation for editor-accessible collections.