Add license cc attribution non commercial 4.0 international #101

Merged
caseyparker merged 3 commits from add-license-CC-Attribution-NonCommercial-4.0-International into master 2017-07-29 05:51:10 +02:00
Showing only changes of commit 2a10baf72c - Show all commits

View file

@ -1,9 +1,9 @@
const logger = require('winston'); const logger = require('winston');
const licenses = ['Creative Commons', 'Public Domain', 'CC Attribution-NonCommercial 4.0 International'];
module.exports = ({ value }) => { module.exports = ({ value }) => {
logger.debug('checking isFreePublicClaim ?'); logger.debug('checking isFreePublicClaim ?');
if ( 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) (!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)
) { ) {
return true; return true;