Comparing version 0.1.4 to 0.1.5
@@ -77,3 +77,3 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
this.operation = options.operation || 'add'; | ||
this.operation = options.operation || options.type || 'add'; | ||
this.modification = options.modification || {}; | ||
@@ -80,0 +80,0 @@ } |
@@ -271,10 +271,15 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
var theirs = dn.rdns[i]; | ||
for (var k in ours) { | ||
if (ours.hasOwnProperty(k)) { | ||
if (!theirs.hasOwnProperty(k)) | ||
return false; | ||
var ourKeys = Object.keys(ours); | ||
var theirKeys = Object.keys(theirs); | ||
if (ourKeys.length !== theirKeys.length) | ||
return false; | ||
if (ours[k] !== theirs[k]) | ||
return false; | ||
} | ||
ourKeys.sort(); | ||
theirKeys.sort(); | ||
for (var j = 0; j < ourKeys.length; j++) { | ||
if (ourKeys[j] !== theirKeys[j]) | ||
return false; | ||
if (ours[ourKeys[j]] !== theirs[ourKeys[j]]) | ||
return false; | ||
} | ||
@@ -281,0 +286,0 @@ } |
@@ -736,3 +736,3 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
backend: routes.backend, | ||
handlers: route[op] || [defaultExopHandler] | ||
handlers: route[op] || [noExOpHandler] | ||
}; | ||
@@ -739,0 +739,0 @@ } else if (req.protocolOp === Protocol.LDAP_REQ_UNBIND) { |
@@ -6,3 +6,3 @@ { | ||
"description": "LDAP client and server APIs", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -232,2 +232,10 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
test('bogus exop (GH-17)', function(t) { | ||
client.exop('cn=root', function(err, value) { | ||
t.ok(err); | ||
t.end(); | ||
}); | ||
}); | ||
test('modify success', function(t) { | ||
@@ -234,0 +242,0 @@ var change = new Change({ |
@@ -113,1 +113,14 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
}); | ||
test('empty DNs GH-16', function(t) { | ||
var _dn = dn.parse(''); | ||
var _dn2 = dn.parse('cn=foo'); | ||
t.notOk(_dn.equals('cn=foo')); | ||
t.notOk(_dn2.equals('')); | ||
t.notOk(_dn.parentOf('cn=foo')); | ||
t.notOk(_dn.childOf('cn=foo')); | ||
t.notOk(_dn2.parentOf('')); | ||
t.notOk(_dn2.childOf('')); | ||
t.end(); | ||
}); |
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
615386
113
9184