atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Workflow for drafts / publishing / archiving (the Status attribute)

Open joepio opened this issue 3 years ago • 0 comments

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 Draft class to your draft, additional to the class that your resource is (e.g. Blog)
  • Add a publish-parent property, pointing to where the resource will be posted
  • Add a publish-subject property, which contains the URL of where it will be created
  • When publishing, create a new Resource as child of the publish-parent using the publish-subject as subject. Remove the Draft class and the publish-* properties

Some related ideas

  • publish-at with a scheduler
  • publish-flow with a bunch of workflows

joepio avatar Jul 19 '22 09:07 joepio