modified: helpers/functions/isFreePublicClaim.js
list of allowable licenses is now an array
This commit is contained in:
parent
1455d63047
commit
2a10baf72c
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue