diff options
author | David Mehren | 2021-02-16 20:15:15 +0100 |
---|---|---|
committer | GitHub | 2021-02-16 20:15:15 +0100 |
commit | 59819be34c2428450528362a5bbb74b6424d15d2 (patch) | |
tree | ad80595f5dd94a7ac63bc1481943ae7b356ddb17 /lib/web/auth/ldap | |
parent | 6b8fa94402539168a5bd574ddcc17eeae4910bd0 (diff) | |
parent | 136d895d155f28c2e75b3af206549acaa2a354ed (diff) |
Merge pull request #872 from hedgedoc/renovate/master-major-linters
Diffstat (limited to 'lib/web/auth/ldap')
-rw-r--r-- | lib/web/auth/ldap/index.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js index b501106d..4142194f 100644 --- a/lib/web/auth/ldap/index.js +++ b/lib/web/auth/ldap/index.js @@ -9,7 +9,7 @@ const logger = require('../../../logger') const { urlencodedParser } = require('../../utils') const errors = require('../../../errors') -let ldapAuth = module.exports = Router() +const ldapAuth = module.exports = Router() passport.use(new LDAPStrategy({ server: { @@ -22,7 +22,7 @@ passport.use(new LDAPStrategy({ tlsOptions: config.ldap.tlsOptions || null } }, function (user, done) { - var uuid = user.uidNumber || user.uid || user.sAMAccountName || undefined + let uuid = user.uidNumber || user.uid || user.sAMAccountName || undefined if (config.ldap.useridField && user[config.ldap.useridField]) { uuid = user[config.ldap.useridField] } @@ -34,12 +34,12 @@ passport.use(new LDAPStrategy({ '"useridField" option in ldap settings.') } - var username = uuid + let username = uuid if (config.ldap.usernameField && user[config.ldap.usernameField]) { username = user[config.ldap.usernameField] } - var profile = { + const profile = { id: 'LDAP-' + uuid, username: username, displayName: user.displayName, @@ -48,7 +48,7 @@ passport.use(new LDAPStrategy({ profileUrl: null, provider: 'ldap' } - var stringifiedProfile = JSON.stringify(profile) + const stringifiedProfile = JSON.stringify(profile) models.User.findOrCreate({ where: { profileid: profile.id.toString() @@ -58,7 +58,7 @@ passport.use(new LDAPStrategy({ } }).spread(function (user, created) { if (user) { - var needSave = false + let needSave = false if (user.profile !== stringifiedProfile) { user.profile = stringifiedProfile needSave = true |