diff --git a/src/browser/BrowserAccessControlDialog.cpp b/src/browser/BrowserAccessControlDialog.cpp index 9a10e555f..2571610eb 100644 --- a/src/browser/BrowserAccessControlDialog.cpp +++ b/src/browser/BrowserAccessControlDialog.cpp @@ -59,3 +59,8 @@ void BrowserAccessControlDialog::setRemember(bool r) { m_ui->rememberDecisionCheckBox->setChecked(r); } + +void BrowserAccessControlDialog::setHTTPAuth(bool httpAuth) +{ + m_ui->rememberDecisionCheckBox->setVisible(!httpAuth); +} diff --git a/src/browser/BrowserAccessControlDialog.h b/src/browser/BrowserAccessControlDialog.h index 4c93a54fc..79aba9c4b 100644 --- a/src/browser/BrowserAccessControlDialog.h +++ b/src/browser/BrowserAccessControlDialog.h @@ -41,6 +41,7 @@ public: void setItems(const QList& items); bool remember() const; void setRemember(bool r); + void setHTTPAuth(bool httpAuth); private: QScopedPointer m_ui; diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp index eb88b5c1b..990b53123 100644 --- a/src/browser/BrowserService.cpp +++ b/src/browser/BrowserService.cpp @@ -400,7 +400,7 @@ QJsonArray BrowserService::findMatchingEntries(const QString& id, } // Confirm entries - if (confirmEntries(pwEntriesToConfirm, url, host, submitHost, realm)) { + if (confirmEntries(pwEntriesToConfirm, url, host, submitHost, realm, httpAuth)) { pwEntries.append(pwEntriesToConfirm); } @@ -764,7 +764,8 @@ bool BrowserService::confirmEntries(QList& pwEntriesToConfirm, const QString& url, const QString& host, const QString& submitHost, - const QString& realm) + const QString& realm, + const bool httpAuth) { if (pwEntriesToConfirm.isEmpty() || m_dialogActive) { return false; @@ -775,6 +776,7 @@ bool BrowserService::confirmEntries(QList& pwEntriesToConfirm, connect(m_dbTabWidget, SIGNAL(databaseLocked(DatabaseWidget*)), &accessControlDialog, SLOT(reject())); accessControlDialog.setUrl(url); accessControlDialog.setItems(pwEntriesToConfirm); + accessControlDialog.setHTTPAuth(httpAuth); raiseWindow(); accessControlDialog.show(); diff --git a/src/browser/BrowserService.h b/src/browser/BrowserService.h index a64cc7338..d6f14f8e9 100644 --- a/src/browser/BrowserService.h +++ b/src/browser/BrowserService.h @@ -118,7 +118,8 @@ private: const QString& url, const QString& host, const QString& submitHost, - const QString& realm); + const QString& realm, + const bool httpAuth); QJsonObject prepareEntry(const Entry* entry); Access checkAccess(const Entry* entry, const QString& host, const QString& submitHost, const QString& realm); Group* getDefaultEntryGroup(const QSharedPointer& selectedDb = {});