Merge pull request #831 from mprasil/whitelist-fix

SIGNUPS_ALLOWED with no whitelist [fixes #830]
This commit is contained in:
Daniel García 2020-01-29 13:28:07 +01:00 committed by GitHub
commit 5352321fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ impl Config {
// (it doesn't contain any domains), or if it matches at least
// one domain.
let whitelist_str = self.signups_domains_whitelist();
whitelist_str.is_empty() || whitelist_str.split(',').filter(|s| !s.is_empty()).any(|d| d == e[0])
( whitelist_str.is_empty() && CONFIG.signups_allowed() )|| whitelist_str.split(',').filter(|s| !s.is_empty()).any(|d| d == e[0])
}
pub fn delete_user_config(&self) -> Result<(), Error> {