NCIOCPL / cgov-digital-platform

The Cancer.gov Digital Communications Platform
GNU General Public License v2.0
11 stars 33 forks source link

Prevent deletion of published videos, infographics, and files by non-admins #839

Open bryanpizzillo opened 5 years ago

bryanpizzillo commented 5 years ago

Basically, the same workflow rule as content. An image_manager should be able to delete any images that are draft and never have been published. However, once they have been published they may be in use, and therefore no one should be allowed to willy-nilly delete them.

Lindsay Asking Bryan: if an image is published, but no longer being used on the site, can it be deleted? I don't think it's a "willy-nilly" deletion if the image has no relationship with other content in the CMS.

There may be limitations with Drupal core WRT media items and being able to hook into the permission checks like we do with content.

RULES: Story 1: Remove image deletion for image managers from both Image (cgov_image) and Contextual Image (cgov_contextual_image) when an image is published.

Task 2: Add “request delete” option for published images

Task 3: For videos, infographics, and files, authors can request archive, editors can approve archive request, and only site admins can delete.

This follows the same editorial workflow as nodes.

amydugan commented 5 years ago

This is not a blocker for May 2019, but it is riskier if we don't do it. Marking in scope for May 2019 for now.

adriancofie commented 4 years ago

This ticket covers not only images, but other cgov media as well.

Task 1: Remove image deletion for image managers.

Scenario 1: An image manager creates an image, changes their mind before publishing. The user should be able to delete the image from the unpublished state.

Scenario 2: An image manager creates an image and publishes it. They should not be able to delete the image.

Scenario 3. An image manager, executes scenario 2. The image manager archives the image. Once archived the image can be deleted by a site admin.

Task 2: Ensure all other media follows the content workflow. For videos, infographics, and files, authors can request archive, editors can approve archive request, and only site admins can delete.

VictoriaSunNIH commented 3 years ago

This ticket is only for the other media items, we have moved images out into its own thing #3104