Update user registration logic to use reactive setting for disableRegistration

This commit is contained in:
omri zaher 2025-09-19 19:49:44 +03:00
parent 155fef1f55
commit 26ae280fe3
2 changed files with 85 additions and 11 deletions

View file

@ -1822,7 +1822,8 @@ if (Meteor.isServer) {
return user;
}
const disableRegistration = false;
const disableRegistration =
ReactiveCache.getCurrentSetting().disableRegistration;
// If this is the first Authentication by the ldap and self registration disabled
if (disableRegistration && options && options.ldap) {
user.authenticationMethod = 'ldap';