Socket
Socket
Sign inDemoInstall

@davistran86/ad

Package Overview
Dependencies
40
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.7 to 1.0.8

2

package.json
{
"name": "@davistran86/ad",
"version": "1.0.7",
"version": "1.0.8",
"description": "Active Directory API for Node",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,3 +0,3 @@

const api = require('../util/api');
const ldap = require('ldapjs');
const api = require("../util/api");
const ldap = require("ldapjs");

@@ -23,4 +23,4 @@ /**

tlsOptions: {
rejectUnauthorized: false
}
rejectUnauthorized: false,
},
});

@@ -37,3 +37,3 @@ client.bind(this.config.user, this.config.pass, function(err, data) {

return new Promise(async (resolve, reject) => {
let cached = this._cache.get('all', cacheKey);
let cached = this._cache.get("all", cacheKey);
if (cached) {

@@ -46,3 +46,3 @@ return resolve(api.processResults(opts, cached));

includeMembership: membership,
includeDeleted: false
includeDeleted: false,
};

@@ -61,4 +61,4 @@

if (membership.indexOf('all') > -1) {
this._cache.set('all', cacheKey, results);
if (membership.indexOf("all") > -1) {
this._cache.set("all", cacheKey, results);
return resolve(api.processResults(opts, results));

@@ -68,15 +68,15 @@ }

let compiled = [];
if (membership.indexOf('user') > -1) {
if (membership.indexOf("user") > -1) {
compiled = compiled.concat(results.users);
}
if (membership.indexOf('group') > -1) {
if (membership.indexOf("group") > -1) {
compiled = compiled.concat(results.groups);
}
if (membership.indexOf('other') > -1) {
if (membership.indexOf("other") > -1) {
compiled = compiled.concat(results.other);
}
this._cache.set('all', cacheKey, compiled);
this._cache.set("all", cacheKey, compiled);
resolve(api.processResults(opts, compiled));

@@ -91,3 +91,3 @@ });

filter,
includeDeleted: false
includeDeleted: false,
};

@@ -140,3 +140,3 @@ try {

return new Promise(async (resolve, reject) => {
let baseDN = String(this.config.baseDN).replace(/dc=/g, 'DC=');
let baseDN = String(this.config.baseDN).replace(/dc=/g, "DC=");
let fullDN = String(`${name},${location}${baseDN}`);

@@ -155,5 +155,5 @@ const [error, client] = await this._getBoundClient();

client.unbind();
if (error) {
if (err) {
/* istanbul ignore next */
return reject(error);
return reject(err);
}

@@ -169,8 +169,8 @@ delete object.userPassword;

return new Promise(async (resolve, reject) => {
this._search(searchString, { fields: ['dn'] })
.then(results => {
this._search(searchString, { fields: ["dn"] })
.then((results) => {
if (results.length < 1) {
/* istanbul ignore next */
return reject({
message: `Object ${searchString} does not exist.`
message: `Object ${searchString} does not exist.`,
});

@@ -183,3 +183,3 @@ }

this._deleteObjectByDN(results[0].dn)
.then(result => {
.then((result) => {
resolve(result);

@@ -202,5 +202,5 @@ })

client.unbind();
if (error) {
if (err) {
/* istanbul ignore next */
return reject(error);
return reject(err);
}

@@ -220,3 +220,3 @@ resolve({ success: true });

try {
client.modifyDN(oldDN, newDN, err => {
client.modifyDN(oldDN, newDN, (err) => {
client.unbind();

@@ -234,3 +234,3 @@ if (err) {

});
}
},
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc