blinkk / rootjs

Root.js – A full-featured web development tool with a built-in CMS.
https://rootjs.dev
MIT License
5 stars 0 forks source link

Automatically add "publishing lock" when a change is made #349

Open stevenle opened 1 month ago

stevenle commented 1 month ago

Description

Until we have a formal approval flow (via the Releases page), we can build an informal approval system by automatically adding a "publishing lock" whenever new draft edits are made to a doc.

Within collections/Pages.schema.ts, a user can opt-in to automatic locks by doing something like:

export default schema.collection({
  name: 'Pages',
  fields: [/* schema fields */],
  autolock: true,
  autolockReason: 'Requires approval before publishing.',
});