Expose WebUI ban counter to users

This commit is contained in:
Chocobo1
2020-02-12 18:51:38 +08:00
committed by sledgehammer999
parent 544d3f9025
commit b19153287b
8 changed files with 67 additions and 5 deletions

View File

@@ -621,6 +621,16 @@ void Preferences::setWebUIPassword(const QByteArray &password)
setValue("Preferences/WebUI/Password_PBKDF2", password);
}
int Preferences::getWebUIMaxAuthFailCount() const
{
return value("Preferences/WebUI/MaxAuthenticationFailCount", 5).toInt();
}
void Preferences::setWebUIMaxAuthFailCount(const int count)
{
setValue("Preferences/WebUI/MaxAuthenticationFailCount", count);
}
int Preferences::getWebUISessionTimeout() const
{
return value("Preferences/WebUI/SessionTimeout", 3600).toInt();