apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
Other
4.36k stars 590 forks source link

prevent un-publishing singletons #4739

Closed ETLaurent closed 1 month ago

ETLaurent commented 1 month ago

Summary

Attempting to un-publish a singleton such as global results in a Forbidden error:

image

Also, we now hide the "Unpublish" item from context menu of singletons:

before after
image image

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

Make sure the PR fulfills these requirements:

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

linear[bot] commented 1 month ago

PRO-6599 Remove the "Unpublish" option from the context menu for all singletons