2017-06-20 04:34:34 +02:00
|
|
|
const logger = require('winston');
|
2017-07-24 01:52:16 +02:00
|
|
|
const licenses = ['Creative Commons', 'Public Domain', 'CC Attribution-NonCommercial 4.0 International'];
|
2017-07-29 06:06:33 +02:00
|
|
|
|
2017-06-17 22:51:30 +02:00
|
|
|
module.exports = ({ value }) => {
|
2017-06-20 04:34:34 +02:00
|
|
|
logger.debug('checking isFreePublicClaim ?');
|
2017-07-29 06:06:33 +02:00
|
|
|
if ((licenses.includes(value.stream.metadata.license)) && (!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)) {
|
2017-06-19 18:37:35 +02:00
|
|
|
return true;
|
2017-06-17 22:51:30 +02:00
|
|
|
} else {
|
2017-06-19 18:37:35 +02:00
|
|
|
return false;
|
2017-06-17 22:51:30 +02:00
|
|
|
}
|
2017-06-19 18:37:35 +02:00
|
|
|
};
|