diff options
author | Philip Molares | 2021-02-15 09:42:51 +0100 |
---|---|---|
committer | Philip Molares | 2021-02-15 12:15:14 +0100 |
commit | 136d895d155f28c2e75b3af206549acaa2a354ed (patch) | |
tree | ad80595f5dd94a7ac63bc1481943ae7b356ddb17 /lib/web/auth/ldap | |
parent | b0a45bdf9c531d93a2462c09d58b2e9e703a0a66 (diff) |
Linter: Fix all lint errors
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Diffstat (limited to '')
-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 |