mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
- Fix [Cannot login with new LDAP account when auto-registration disabled (request invitation code)](https://github.com/wekan/wekan-ldap/issues/29);
- Fix [Unable to create new account from LDAP](https://github.com/wekan/wekan-ldap/issues/32). Thanks to Akuket ! Closes wekan/wekan-ldap#29, closes wekan/wekan-ldap#32
This commit is contained in:
parent
2ae143e6da
commit
f8ef8507b5
1 changed files with 7 additions and 3 deletions
|
@ -520,10 +520,14 @@ if (Meteor.isServer) {
|
|||
}
|
||||
|
||||
const disableRegistration = Settings.findOne().disableRegistration;
|
||||
// If this is the first Authentication by the ldap and self registration disabled
|
||||
if (disableRegistration && options.ldap) {
|
||||
user.authenticationMethod = 'ldap';
|
||||
return user;
|
||||
}
|
||||
|
||||
// If self registration enabled
|
||||
if (!disableRegistration) {
|
||||
if (options.ldap) {
|
||||
user.authenticationMethod = 'ldap';
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue