Skip to content

Commit

Permalink
Do not show invalid images as no_rights in costState
Browse files Browse the repository at this point in the history
I did this in #3854 to try and override all other costs when an image is
missing credit or description (one definition of "valid"). Instead it
overrides all other costs whenever an image is uncroppable (restricted,
overquota, etc., the other definition of "valid").

costState is used to determine both which flags to show on the search
results page, and also the warnings/error messages on the image page,
which means that this change hid the restriction text from ALL
unpermissioned users! So revert this logic now, and commit to finding a
better way of applying the invalid flag in the future.
  • Loading branch information
andrew-nowak committed Oct 24, 2022
1 parent 7939bee commit efd742b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kahuna/public/js/image/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ imageService.factory('imageService', ['imageLogic', function(imageLogic) {
cost,
hasCrops: image.data.exports && image.data.exports.length > 0,
hasRights,
costState: hasRights && image.data.valid ? cost : "no_rights",
costState: hasRights ? cost : "no_rights",
isValid: image.data.valid,
canDelete: imageLogic.canBeDeleted(image),
canArchive: imageLogic.canBeArchived(image),
Expand Down

0 comments on commit efd742b

Please sign in to comment.