Skip to content

Commit

Permalink
added prevent create config option
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmirKadric committed Nov 26, 2018
1 parent 3add985 commit 36f7162
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/tasks/archivist-create.js
Expand Up @@ -21,6 +21,12 @@ exports.start = function (mage, options, cb) {
return callback();
}

var preventCreate = mage.core.config.get(['archivist', 'vaults', vaultName, 'config', 'preventCreate'], false);
if (preventCreate) {
mage.core.logger.notice('Vault', vault.name, 'has disabled create operation. Skipping.');
return callback();
}

if (typeof vault.createDatabase === 'function') {
vault.createDatabase(callback);
} else {
Expand Down

0 comments on commit 36f7162

Please sign in to comment.