atomic-server
atomic-server copied to clipboard
Workflow for drafts / publishing / archiving (the Status attribute)
Many headless CMS tools have tools that help content people (writers / communication employees) schedule posts, show which items are published, and put things in an archive.
Approaches
Add status property
Let's call this the status of a Resource. I think having an enum that is either draft, published or archived makes sense here.
This status should have effect on rights: When the status is changed, automatically update the rights. Add a public read right when it's published. Or, alternatively, check for a status of a document, and only grant the public right if the status is set to published.
- What about publishing things to a non-public group? Say we have an internal document that's (while in draft mode) only visible / editable for specific colleagues, and after publishing, is visible to the entire organisation, but not the public. How do we cover this usecase?
Change parent when posting drive from my-drafts to target-parent
- Add the
Draftclass to your draft, additional to the class that your resource is (e.g.Blog) - Add a
publish-parentproperty, pointing to where the resource will be posted - Add a
publish-subjectproperty, which contains the URL of where it will be created - When publishing, create a new Resource as child of the
publish-parentusing thepublish-subjectas subject. Remove theDraftclass and thepublish-*properties
Some related ideas
publish-atwith a schedulerpublish-flowwith a bunch of workflows