clay/amphora

Prevent archiving of published pages

Closed this issue · 0 comments

Description

Pages can be archived outside of Kiln (ex. with curl), without being unpublished.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a page
  2. Publish the page
  3. Archive the page
    • PUT or PATCH to /_pages/[uri]/meta with an object with archived: true in the request body
  4. Check the /meta endpoint, with a GET to /_pages/[uri]/meta to see that the archived property is true

Expected Behavior

If the metadata publish property is true, then any write to the meta object when archived is true, will fail and return 400 Bad Request.

Additional Context

#644