Pick your license, copy to the script at the end, and update the database. For large databases this can take some time, but should not impact clowder.
Custom license, the default. If you set rightsHolder to be "" it will default to the uploader. Set m_allowDownload
to true (allow downloads) or false (no downloads except admins and owner).
var license={
"licenseData": {
"m_licenseType" : "license1",
"m_licenseUrl" : "",
"m_licenseText" : "All rights reserved",
"m_rightsHolder" : "",
"m_allowDownload" : true
}
};
var license={
"licenseData": {
"m_licenseType" : "license2",
"m_licenseUrl" : "http://creativecommons.org/licenses/by/3.0/",
"m_licenseText" : "Attribution",
}
};
var license={
"licenseData": {
"m_licenseType" : "license2",
"m_licenseUrl" : "http://creativecommons.org/licenses/by-sa/3.0/",
"m_licenseText" : "Attribution-ShareAlike",
}
};
var license={
"licenseData": {
"m_licenseType" : "license2",
"m_licenseUrl" : "http://creativecommons.org/licenses/by-nd/3.0/",
"m_licenseText" : "Attribution-NoDerivs",
}
};
var license={
"licenseData": {
"m_licenseType" : "license2",
"m_licenseUrl" : "http://creativecommons.org/licenses/by-nc-nd/3.0/",
"m_licenseText" : "Attribution-NonCommercial-NoDerivs",
}
};
var license={
"licenseData": {
"m_licenseType" : "license2",
"m_licenseUrl" : "http://creativecommons.org/licenses/by-nc-sa/3.0/",
"m_licenseText" : "Attribution-NonCommercial-ShareAlike",
}
};
var license={
"licenseData": {
"m_licenseType" : "license3",
"m_licenseUrl" : "http://creativecommons.org/publicdomain/zero/1.0/",
"m_licenseText" : "Public Domain Dedication",
"m_rightsHolder" : "Public Domain Dedication",
}
};
Pick the license from above and copy it and run the following 3 statements. This will overwrite the license for ALL files.
db.uploads.update({}, {$set: license}, {"multi": 1})
db.curationFiles.update({}, {$set: license}, {"multi": 1})
db.datasets.update({}, {$set: license}, {"multi": 1})
For example the following will set the license for all files to be public domain:
var license={
"licenseData": {
"m_licenseType" : "license3",
"m_licenseUrl" : "http://creativecommons.org/publicdomain/zero/1.0/",
"m_licenseText" : "Public Domain Dedication",
"m_rightsHolder" : "Public Domain Dedication",
}
};
db.uploads.update({}, {$set: license}, {"multi": 1})
db.curationFiles.update({}, {$set: license}, {"multi": 1})
db.datasets.update({}, {$set: license}, {"multi": 1})