Skip to content

Commit

Permalink
Merge pull request guardian#4300 from bbc/t1803-usage-rights-bug
Browse files Browse the repository at this point in the history
correct logic error in usable for all when restrictions are inferred from config
  • Loading branch information
paperboyo authored Jul 18, 2024
2 parents 0afabac + c62a7c0 commit 145dcd7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const usableForAllClause = (image: any) : boolean => {
image.data.cost.toString().toLowerCase() === "conditional")) {
hasRestrictions = true;
}
if (image.data.usageRights &&
image.data.usageRights.usageRestrictions) {
hasRestrictions = true;
}
let bbcOwned = false;
if (image.data.metadata.credit &&
image.data.metadata.credit.toString().toLowerCase().includes("bbc")) {
Expand Down

0 comments on commit 145dcd7

Please sign in to comment.