Added registration email blacklist (#2352)

* Added registration email blacklist

Added the ability to define email blacklist for user registration.  Now
server operators can prevent users from registering accounts that
contain providers they do not wish users to use.

* Update ini option for clarity

Updated servatrice ini option name for clarity.

* Updated description for clarity

Added implicit explination
This commit is contained in:
woogerboy21 2017-02-08 15:25:27 -05:00 committed by GitHub
parent dab731656d
commit 0fdb9b7c83
6 changed files with 30 additions and 0 deletions

View file

@ -240,6 +240,8 @@ bool Servatrice::initServer()
qDebug() << "Accept registered users only: " << getRegOnlyServerEnabled();
qDebug() << "Registration enabled: " << getRegistrationEnabled();
if (getRegistrationEnabled()) {
QStringList emailBlackListFilters = getEmailBlackList().split(",", QString::SkipEmptyParts);
qDebug() << "Email blacklist: " << emailBlackListFilters;
qDebug() << "Require email address to register: " << getRequireEmailForRegistrationEnabled();
qDebug() << "Require email activation via token: " << getRequireEmailActivationEnabled();
if (getMaxAccountsPerEmail()) { qDebug() << "Maximum number of accounts per email: " << getMaxAccountsPerEmail(); } else { qDebug() << "Maximum number of accounts per email: unlimited"; }
@ -843,4 +845,8 @@ int Servatrice::getMaxAccountsPerEmail() const {
bool Servatrice::getEnableInternalSMTPClient() const {
return settingsCache->value("smtp/enableinternalsmtpclient", true).toBool();
}
QString Servatrice::getEmailBlackList() const {
return settingsCache->value("registration/emailproviderblacklist").toString();
}