Open cope opened 6 years ago
See issue 189 (https://github.com/gheeres/node-activedirectory/issues/189). Forked it and started on rebuilding it a little bit. Looks like it would solve some problems.
Allright. Back from vacation.
Voila. Still a work in progress. But should at least work with code that is implemented with the original module and promises are in it too. If you find any issues it woudl be great if you reported them https://www.npmjs.com/package/ad-promise
I'm not sure how they implemented util.promisify but it won't work with node-activedirectory. The callback has the correct structure for util.promisify (err, res) but it loses the config, hence you lose the communication with the AD. What you can do in the meanwhile is wrapping the methods you need from node-activedirectory with a promise.
Do you plan to replace callbacks with (or just add) promises?
Or do you know any promisifying solutions that work with node-activedirectory?
I tried
util.promisify
on thegetUsersForGroup
method, but that throws theself.findGroup is not a function
error :(