|
|
@@ -139,8 +139,10 @@ module.exports = function(crowi, app) {
|
|
|
actions.register = function(req, res) {
|
|
|
const googleAuth = require('../util/googleAuth')(crowi);
|
|
|
|
|
|
- // ログイン済みならさようなら
|
|
|
- if (req.user) {
|
|
|
+ // redirect to '/' if both of these are true:
|
|
|
+ // 1. user has logged in
|
|
|
+ // 2. req.user is not username/email string (which is set by basic-auth-connect)
|
|
|
+ if (req.user != null && req.user instanceof Object) {
|
|
|
return res.redirect('/');
|
|
|
}
|
|
|
|