Comparing version 0.2.4 to 0.3.0
{ | ||
"name": "ad", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "Active Directory API for Node", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -191,23 +191,30 @@ const ssha = require('node-ssha256'); | ||
if (opts.commonName !== undefined) { | ||
this.setUserCN(currUserName, opts.commonName) | ||
.then(res => { | ||
go(); | ||
}) | ||
.then(data => { | ||
let expirationMethod = | ||
opts.passwordExpires === false | ||
? 'setUserPasswordNeverExpires' | ||
: 'enableUser'; | ||
this.findUser(currUserName) | ||
.then(data => { | ||
if (opts.commonName !== undefined) { | ||
return this.setUserCN(currUserName, opts.commonName); | ||
} | ||
}) | ||
.then(data => { | ||
let expirationMethod = | ||
opts.passwordExpires === false | ||
? 'setUserPasswordNeverExpires' | ||
: 'enableUser'; | ||
if (opts.passwordExpires !== undefined) { | ||
return this[expirationMethod](userName); | ||
}) | ||
.then(data => { | ||
let enableMethod = | ||
opts.enabled === false ? 'disableUser' : 'enableUser'; | ||
} | ||
}) | ||
.then(data => { | ||
let enableMethod = | ||
opts.enabled === false ? 'disableUser' : 'enableUser'; | ||
if (opts.enabled !== undefined) { | ||
return this[enableMethod](userName); | ||
}) | ||
.catch(err => { | ||
return reject(err); | ||
}); | ||
} | ||
} | ||
}) | ||
.then(res => { | ||
go(); | ||
}) | ||
.catch(err => { | ||
return reject(err); | ||
}); | ||
}); | ||
@@ -214,0 +221,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70905
1977