Expose WebUI ban counter to users

This commit is contained in:
Chocobo1
2020-02-12 18:51:38 +08:00
parent 316f34cbf5
commit f88d6b2e55
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();