parent
cb70776445
commit
5bab39f58e
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ const assert = require('assert-plus')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const ASN1 = require('@ldapjs/asn1').Ber
|
const ASN1 = require('@ldapjs/asn1').Ber
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ module.exports = EqualityFilter
|
||||||
EqualityFilter.prototype.matches = function (target, strictAttrCase) {
|
EqualityFilter.prototype.matches = function (target, strictAttrCase) {
|
||||||
assert.object(target, 'target')
|
assert.object(target, 'target')
|
||||||
|
|
||||||
const tv = parents.getAttrValue(target, this.attribute, strictAttrCase)
|
const tv = parents.getAttrValue({ sourceObject: target, attributeName: this.attribute, strictCase: strictAttrCase })
|
||||||
let value = this.value
|
let value = this.value
|
||||||
|
|
||||||
if (this.attribute.toLowerCase() === 'objectclass') {
|
if (this.attribute.toLowerCase() === 'objectclass') {
|
||||||
|
@ -29,13 +29,19 @@ EqualityFilter.prototype.matches = function (target, strictAttrCase) {
|
||||||
* implementation behaves in this manner.
|
* implementation behaves in this manner.
|
||||||
*/
|
*/
|
||||||
value = value.toLowerCase()
|
value = value.toLowerCase()
|
||||||
return parents.testValues(function (v) {
|
return parents.testValues({
|
||||||
return value === v.toLowerCase()
|
rule: function (v) {
|
||||||
}, tv)
|
return value === v.toLowerCase()
|
||||||
|
},
|
||||||
|
value: tv
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return parents.testValues(function (v) {
|
return parents.testValues({
|
||||||
return value === v
|
rule: function (v) {
|
||||||
}, tv)
|
return value === v
|
||||||
|
},
|
||||||
|
value: tv
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ const assert = require('assert')
|
||||||
|
|
||||||
const asn1 = require('@ldapjs/asn1')
|
const asn1 = require('@ldapjs/asn1')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Protocol = require('@ldapjs/protocol')
|
const Protocol = require('@ldapjs/protocol')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
const parents = require('ldap-filter')
|
const parents = require('@ldapjs/filter')
|
||||||
|
|
||||||
const Filter = require('./filter')
|
const Filter = require('./filter')
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ldapjs/asn1": "^1.0.0",
|
"@ldapjs/asn1": "^1.0.0",
|
||||||
"@ldapjs/controls": "^1.0.0",
|
"@ldapjs/controls": "^1.0.0",
|
||||||
|
"@ldapjs/filter": "^1.0.0-rc.1",
|
||||||
"@ldapjs/protocol": "^1.0.0",
|
"@ldapjs/protocol": "^1.0.0",
|
||||||
"abstract-logging": "^2.0.0",
|
"abstract-logging": "^2.0.0",
|
||||||
"assert-plus": "^1.0.0",
|
"assert-plus": "^1.0.0",
|
||||||
"backoff": "^2.5.0",
|
"backoff": "^2.5.0",
|
||||||
"ldap-filter": "^0.3.3",
|
|
||||||
"once": "^1.4.0",
|
"once": "^1.4.0",
|
||||||
"vasync": "^2.2.0",
|
"vasync": "^2.2.0",
|
||||||
"verror": "^1.8.1"
|
"verror": "^1.8.1"
|
||||||
|
|
Loading…
Reference in New Issue