Comparing version 1.0.4 to 1.0.5
@@ -6,4 +6,5 @@ { | ||
"no-underscore-dangle": 0, | ||
"prefer-rest-params": 0 | ||
"prefer-rest-params": 0, | ||
"linebreak-style": 0 | ||
} | ||
} |
@@ -19,3 +19,3 @@ // Module | ||
sn: 'bar', | ||
mail: 'test@telefonica.com', | ||
mail: 'sergio@telefonica.com', | ||
objectclass: [ | ||
@@ -22,0 +22,0 @@ 'person', |
{ | ||
"cn": ["admin"], | ||
"dc": ["spotdyna", "com"], | ||
"cn": ["Manager"], | ||
"dc": ["maxcrc", "com"], | ||
"url": "ldap://127.0.0.1:389", | ||
"password": "123456" | ||
} |
@@ -19,6 +19,6 @@ // Module | ||
}; | ||
const condition = { | ||
const where = { | ||
mail: 'test@telefonica.com', | ||
}; | ||
return Client.Update(update, condition, ['usuarios'], ['testFolder']); // Send query | ||
return Client.Update(update, where, ['usuarios'], ['testFolder']); // Send query | ||
}) | ||
@@ -25,0 +25,0 @@ .then((data) => { |
@@ -18,3 +18,6 @@ // Imports | ||
if (opts.filter && typeof opts.filter !== 'string') { | ||
opts.filter = BetweenJoin(opts.filter, '$1=$2,', 1); | ||
opts.filter = BetweenJoin(opts.filter, '($1=$2)'); | ||
if (opts.filter.length > 0) { | ||
opts.filter = `(&${opts.filter})`; | ||
} | ||
} | ||
@@ -24,2 +27,3 @@ // Response logic | ||
// Client | ||
// process.exit(); | ||
self.client.search(base, opts, (errSearch, res) => { | ||
@@ -52,3 +56,3 @@ const allData = []; | ||
// Response | ||
const resolv = info.length === 1 ? info[0] : info; | ||
const resolv = info.length === 1 ? info : info; | ||
resolve(resolv); | ||
@@ -151,6 +155,9 @@ }); | ||
const response = (resolve, reject) => { | ||
// Properties | ||
const operation = 'add'; | ||
const modification = dn; | ||
// Merge params | ||
const change = { | ||
operation: 'add', | ||
modification: dn, | ||
operation, | ||
modification, | ||
}; | ||
@@ -157,0 +164,0 @@ // Send update |
@@ -33,4 +33,7 @@ // Imports | ||
const folder = Array.isArray(cn) ? BetweenJoin(cn, 'cn=$1,', 1) : cn; | ||
// Define params | ||
const subou = ou ? `${ou},` : ''; | ||
const subcn = folder ? `${folder},` : ''; | ||
const base = `${ou},${subcn}${this.dc}`; | ||
// Set base | ||
const base = `${subou}${subcn}${this.dc}`; | ||
// Response | ||
@@ -37,0 +40,0 @@ return base; |
{ | ||
"name": "ldap-agent", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
14208
16
531