diff --git a/helpers/functions/isFreePublicClaim.js b/helpers/functions/isFreePublicClaim.js index d9895814..d8e15894 100644 --- a/helpers/functions/isFreePublicClaim.js +++ b/helpers/functions/isFreePublicClaim.js @@ -1,9 +1,9 @@ const logger = require('winston'); - +const licenses = ['Creative Commons', 'Public Domain', 'CC Attribution-NonCommercial 4.0 International']; module.exports = ({ value }) => { logger.debug('checking isFreePublicClaim ?'); if ( - (value.stream.metadata.license.indexOf('Public Domain') !== -1 || value.stream.metadata.license.indexOf('Creative Commons') !== -1) && + (Array.asList(licenses).contains(value.stream.metadata.license)) && (!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0) ) { return true;