|
@@ -520,10 +520,14 @@ if (Meteor.isServer) {
|
|
}
|
|
}
|
|
|
|
|
|
const disableRegistration = Settings.findOne().disableRegistration;
|
|
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 (!disableRegistration) {
|
|
- if (options.ldap) {
|
|
|
|
- user.authenticationMethod = 'ldap';
|
|
|
|
- }
|
|
|
|
return user;
|
|
return user;
|
|
}
|
|
}
|
|
|
|
|