FEATURE: Added option to bypass Web UI authentication for localhost

This commit is contained in:
Christophe Dumez 2011-02-27 09:34:42 +00:00
parent 79cdad47f1
commit 8b9971003d
41 changed files with 2772 additions and 2605 deletions

View file

@ -86,6 +86,7 @@ HttpServer::HttpServer(int msec, QObject* parent) : QTcpServer(parent) {
const Preferences pref;
username = pref.getWebUiUsername().toLocal8Bit();
password_ha1 = pref.getWebUiPassword().toLocal8Bit();
m_localAuth = pref.isWebUiLocalAuthEnabled();
connect(this, SIGNAL(newConnection()), this, SLOT(newHttpConnection()));
manager = new EventManager(this);
//add torrents
@ -270,3 +271,13 @@ EventManager* HttpServer::eventManager() const
{
return manager;
}
void HttpServer::setlocalAuthEnabled(bool enabled)
{
m_localAuth = enabled;
}
bool HttpServer::isLocalAuthEnabled() const
{
return m_localAuth;
}