Skip to content

Commit 6eac122

Browse files
authored
Merge pull request #1046 from 06kellyjac/ad_fix
fix: correct method for finding ad configuration
2 parents 37ccfb6 + 290116c commit 6eac122

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/service/passport/activeDirectory.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const ActiveDirectoryStrategy = require('passport-activedirectory');
22
const ldaphelper = require('./ldaphelper');
33

4-
const type = "activedirectory";
4+
const type = 'activedirectory';
55

66
const configure = (passport) => {
77
const db = require('../../db');
88

99
// We can refactor this by normalizing auth strategy config and pass it directly into the configure() function,
1010
// ideally when we convert this to TS.
1111
const authMethods = require('../../config').getAuthMethods();
12-
const config = authMethods.find((method) => method.type.toLowerCase() === "activeDirectory");
12+
const config = authMethods.find((method) => method.type.toLowerCase() === type);
1313
const adConfig = config.adConfig;
1414

1515
const { userGroup, adminGroup, domain } = config;
@@ -59,7 +59,7 @@ const configure = (passport) => {
5959
console.log(`Error authenticating AD user: ${err.message}`);
6060
return done(err, null);
6161
}
62-
}
62+
},
6363
),
6464
);
6565

0 commit comments

Comments
 (0)