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

@@ -199,6 +199,7 @@ options_imp::options_imp(QWidget *parent):
connect(spinWebUiPort, SIGNAL(valueChanged(int)), this, SLOT(enableApplyButton()));
connect(textWebUiUsername, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(textWebUiPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(checkBypassLocalAuth, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
// Disable apply Button
applyButton->setEnabled(false);
// Tab selection mecanism
@@ -416,6 +417,7 @@ void options_imp::saveOptions(){
pref.setWebUiUsername(webUiUsername());
// FIXME: Check that the password is valid (not empty at least)
pref.setWebUiPassword(webUiPassword());
pref.setWebUiLocalAuthEnabled(!checkBypassLocalAuth->isChecked());
}
// End Web UI
// End preferences
@@ -650,6 +652,7 @@ void options_imp::loadOptions(){
spinWebUiPort->setValue(pref.getWebUiPort());
textWebUiUsername->setText(pref.getWebUiUsername());
textWebUiPassword->setText(pref.getWebUiPassword());
checkBypassLocalAuth->setChecked(!pref.isWebUiLocalAuthEnabled());
// End Web UI
// Random stuff
srand(time(0));