mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Expose WebUI ban counter to users
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user