Closed Conalb97 closed 1 month ago
Thanks for the review @rebecca-thompson, just going to go through your comments now to try and resolve them :)
Hi @rebecca-thompson :)
After internal discussion and speaking with @paperboyo, we've removed the BBC specific logic from the delete-all endpoint.
As a replacement we now hide the 'delete all' button on images that have syndication usages (but only if the photosales feature flag is turned on). That way we retain the protection against orphaned images in BBC Photosales, without impacting the Guardian or the code base. This does mean that we will be unable to delete images. However, we are okay with this for now as future work will introduce the functionality to delete images from photosales, at which point we can 'reintroduce' the delete all button. In the meantime, situations where an image needs to be deleted is seen as unlikely, and manageable manually.
Thanks!
Seen on auth, usage, image-loader, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (created by @Conalb97 and merged by @paperboyo 10 minutes and 21 seconds ago) Please check your changes!
What does this change?
Note: this PR should be reviewed after https://github.com/guardian/grid/pull/4267 as it builds on the changes included in that PR
The relevant files for this PR are:
Previously, after the user had completed the process of adding a photo sales and they navigated to the usages panel the usage was presented as if it was a standard syndication usage. Now a custom photo sales 'usage' is rendered instead. Additionally, as deleting the usage from the image, does not cause the image to be deleted in photo sales, changes have been made to usagesAPI so that the 'Delete All' button does not delete a syndication usage when it has a partnerName = Capture (i.e. is a photo sales usage).
The Photosales functionality is BBC specific, hence it is disabled by default via the showSendToPhotoSales feature flag.
How should a reviewer test this change?
As a user with elevated permissions and with the showSendToPhotoSales flag set to true:
How can success be measured?
Confirm that the added photo sales usage has the following appearance:
And confirm that after clicking the 'delete all button' the 'Added to Photo Sales' usage remains on the image.
Who should look at this?
Tested? Documented?