|
@@ -69,6 +69,12 @@ module.exports = function(crowi, app) {
|
|
|
req.flash('warningMessage', 'LDAP Server Error occured.');
|
|
req.flash('warningMessage', 'LDAP Server Error occured.');
|
|
|
return next(); // pass and the flash message is displayed when all of authentications are failed.
|
|
return next(); // pass and the flash message is displayed when all of authentications are failed.
|
|
|
}
|
|
}
|
|
|
|
|
+ if (info) {
|
|
|
|
|
+ if (info.name != null && info.name === 'DuplicatedUsernameException') {
|
|
|
|
|
+ req.flash('isDuplicatedUsernameExceptionOccured', true);
|
|
|
|
|
+ return next();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (!user) { return next(); }
|
|
if (!user) { return next(); }
|
|
|
req.logIn(user, (err) => {
|
|
req.logIn(user, (err) => {
|
|
|
if (err) { return next(); }
|
|
if (err) { return next(); }
|