Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/ldapauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ LdapAuth.prototype._findUser = function(username, callback) {
opts.attributes = self.opts.searchAttributes;
}

// groupDnProperty will be accessed in the user returned by the search, and
// so needs to be requested from the LDAP server.
if (self.opts.groupDnProperty && !opts.attributes.includes(self.opts.groupDnProperty)) {
opts.attributes.push(self.optss.groupDnProperty)
}

self._search(self.opts.searchBase, opts, function(err, result) {
if (err) {
self.log && self.log.trace('ldap authenticate: user search error: %s %s %s', err.code, err.name, err.message);
Expand Down