- Revert Improve authentication to [fix Login failure](https://github.com/wekan/wekan/issues/2004).

Thanks to xet7 !

Closes #2004
This commit is contained in:
Lauri Ojansivu 2018-11-17 16:50:42 +02:00
parent 7a75d82114
commit aa691b0af1
13 changed files with 89 additions and 137 deletions

View file

@ -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;
}