mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 05:01:25 -07:00
Expose WebUI ban duration to users
This commit is contained in:
parent
ec61ef5145
commit
6eb190c373
7 changed files with 63 additions and 16 deletions
|
@ -233,6 +233,7 @@ void AppController::preferencesAction()
|
|||
authSubnetWhitelistStringList << Utils::Net::subnetToString(subnet);
|
||||
data["bypass_auth_subnet_whitelist"] = authSubnetWhitelistStringList.join("\n");
|
||||
data["web_ui_max_auth_fail_count"] = pref->getWebUIMaxAuthFailCount();
|
||||
data["web_ui_ban_duration"] = static_cast<int>(pref->getWebUIBanDuration().count());
|
||||
data["web_ui_session_timeout"] = pref->getWebUISessionTimeout();
|
||||
// Use alternative Web UI
|
||||
data["alternative_webui_enabled"] = pref->isAltWebUiEnabled();
|
||||
|
@ -604,6 +605,8 @@ void AppController::setPreferencesAction()
|
|||
}
|
||||
if (hasKey("web_ui_max_auth_fail_count"))
|
||||
pref->setWebUIMaxAuthFailCount(it.value().toInt());
|
||||
if (hasKey("web_ui_ban_duration"))
|
||||
pref->setWebUIBanDuration(std::chrono::seconds {it.value().toInt()});
|
||||
if (hasKey("web_ui_session_timeout"))
|
||||
pref->setWebUISessionTimeout(it.value().toInt());
|
||||
// Use alternative Web UI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue