summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-11-17 16:50:42 +0200
committerLauri Ojansivu <x@xet7.org>2018-11-17 16:50:42 +0200
commitaa691b0af105c8dbc5443b1e0823a701e53c3871 (patch)
tree7f76c9e79c6da428d85160ea9108d586a0e560f8 /models/users.js
parent7a75d821147c7d9e2ad48b212348c4bf2d4db063 (diff)
downloadwekan-aa691b0af105c8dbc5443b1e0823a701e53c3871.tar.gz
wekan-aa691b0af105c8dbc5443b1e0823a701e53c3871.tar.bz2
wekan-aa691b0af105c8dbc5443b1e0823a701e53c3871.zip
- Revert Improve authentication to [fix Login failure](https://github.com/wekan/wekan/issues/2004).
Thanks to xet7 ! Closes #2004
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/users.js b/models/users.js
index 2e879d94..630f4703 100644
--- a/models/users.js
+++ b/models/users.js
@@ -520,10 +520,10 @@ if (Meteor.isServer) {
}
const disableRegistration = Settings.findOne().disableRegistration;
- if (!disableRegistration) {
- if (options.ldap) {
- user.authenticationMethod = 'ldap';
- }
+ // If ldap, bypass the inviation code if the self registration isn't allowed.
+ // TODO : pay attention if ldap field in the user model change to another content ex : ldap field to connection_type
+ if (options.ldap || !disableRegistration) {
+ user.authenticationMethod = 'ldap';
return user;
}