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();

View File

@@ -194,6 +194,8 @@ public:
void setWebUiUsername(const QString &username);
QByteArray getWebUIPassword() const;
void setWebUIPassword(const QByteArray &password);
int getWebUIMaxAuthFailCount() const;
void setWebUIMaxAuthFailCount(int count);
int getWebUISessionTimeout() const;
void setWebUISessionTimeout(int timeout);