revising minimum password strength to be 1 instead of 0
parent
264893a71b
commit
52678621f9
@ -0,0 +1,22 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var db = require('../../database');
|
||||||
|
|
||||||
|
var async = require('async');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'Revising minimum password strength to 1 (from 0)',
|
||||||
|
timestamp: Date.UTC(2017, 1, 21),
|
||||||
|
method: function (callback) {
|
||||||
|
async.waterfall([
|
||||||
|
async.apply(db.getObjectField.bind(db), 'config', 'minimumPasswordStrength'),
|
||||||
|
function (strength, next) {
|
||||||
|
if (!strength) {
|
||||||
|
return db.setObjectField('config', 'minimumPasswordStrength', 1, next);
|
||||||
|
}
|
||||||
|
|
||||||
|
setImmediate(next);
|
||||||
|
},
|
||||||
|
], callback);
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue