|
|
@@ -82,6 +82,11 @@ module.exports = function(crowi, app) {
|
|
|
const strategyName = 'ldapauth';
|
|
|
const ldapAccountInfo = await promisifiedPassportAuthentication(req, res, next, strategyName);
|
|
|
|
|
|
+ // check groups for LDAP
|
|
|
+ if (!isValidLdapUserByGroupFilter(ldapAccountInfo)) {
|
|
|
+ return loginFailure(req, res, next);
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* authentication success
|
|
|
*/
|
|
|
@@ -244,11 +249,6 @@ module.exports = function(crowi, app) {
|
|
|
return next();
|
|
|
}
|
|
|
|
|
|
- // check groups for LDAP user
|
|
|
- if (!isValidLdapUserByGroupFilter(response)) {
|
|
|
- return loginFailure(req, res, next);
|
|
|
- }
|
|
|
-
|
|
|
resolve(response)
|
|
|
})(req, res, next);
|
|
|
});
|