@cepharum/simple-ldap
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@cepharum/simple-ldap", | ||
"version": "0.1.0", | ||
"description": "simple LDAP service exposing user accounts defined in local JSON file", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "node server.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "cepharum GmbH", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://gitlab.com/cepharum-foss/simple-ldap.git" | ||
}, | ||
"bugs": { | ||
"url": "https://gitlab.com/cepharum-foss/simple-ldap/-/issues" | ||
}, | ||
"homepage": "https://gitlab.com/cepharum-foss/simple-ldap#simple-ldap", | ||
"files": [ | ||
"server.js" | ||
], | ||
"dependencies": { | ||
"ldapjs": "^2.2.1" | ||
} | ||
"name": "@cepharum/simple-ldap", | ||
"version": "0.1.1", | ||
"description": "simple LDAP service exposing user accounts defined in local JSON file", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "node server.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "cepharum GmbH", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://gitlab.com/cepharum-foss/simple-ldap.git" | ||
}, | ||
"bugs": { | ||
"url": "https://gitlab.com/cepharum-foss/simple-ldap/-/issues" | ||
}, | ||
"homepage": "https://gitlab.com/cepharum-foss/simple-ldap#simple-ldap", | ||
"files": [ | ||
"server.js" | ||
], | ||
"dependencies": { | ||
"ldapjs": "^2.2.2" | ||
} | ||
} |
@@ -161,6 +161,9 @@ const File = require( "fs" ); | ||
case "base" : | ||
case "sub" : | ||
if ( req.filter.matches( RootNode.attributes ) ) { | ||
case "sub" : { | ||
const attributes = Object.assign( {}, RootNode.attributes ); | ||
if ( req.filter.matches( attributes ) ) { | ||
if ( _offset-- < 1 ) { | ||
res.send( RootNode ); | ||
res.send( { dn: RootNode.dn, attributes } ); | ||
if ( ++count >= limit ) { | ||
@@ -172,2 +175,3 @@ done( count ); | ||
} | ||
} | ||
} | ||
@@ -182,6 +186,8 @@ | ||
const item = db[i]; | ||
const attributes = Object.assign( {}, item.attributes ); | ||
if ( req.filter.matches( item.attributes ) ) { | ||
if ( req.filter.matches( attributes ) ) { | ||
if ( _offset-- < 1 ) { | ||
res.send( item ); | ||
res.send( { dn: item.dn, attributes } ); | ||
if ( ++count >= limit ) { | ||
@@ -222,6 +228,8 @@ done( count ); | ||
const item = db[i]; | ||
const attributes = Object.assign( {}, item.attributes ); | ||
if ( req.dn.equals( item.dn ) && req.filter.matches( item.attributes ) ) { | ||
if ( req.dn.equals( item.dn ) && req.filter.matches( attributes ) ) { | ||
if ( _offset-- < 1 ) { | ||
res.send( item ); | ||
res.send( { dn: item.dn, attributes } ); | ||
if ( ++count >= limit ) { | ||
@@ -228,0 +236,0 @@ done( count ); |
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
14392
253
Updatedldapjs@^2.2.2