Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2019-11-22 12:40:33 +0300
committerHannah von Reth <vonreth@kde.org>2019-11-22 13:13:39 +0300
commitc9e64e7905b4a72476967e6c6980189db9306a39 (patch)
tree9fecb15568caaf46ed37a89f9fc5e0a7f372ff40 /src/gui/creds
parentd3e02b9bbba279f05ea2d611925e20792fd16709 (diff)
Revert "Add a noPreFlight branding option"
This reverts commit c47af368328e0cbacde7d6abeda4b6f4291cc86f. It turned out to be a dead end.
Diffstat (limited to 'src/gui/creds')
-rw-r--r--src/gui/creds/httpcredentialsgui.cpp28
-rw-r--r--src/gui/creds/httpcredentialsgui.h1
2 files changed, 8 insertions, 21 deletions
diff --git a/src/gui/creds/httpcredentialsgui.cpp b/src/gui/creds/httpcredentialsgui.cpp
index 8c68589f7..88c5a01b3 100644
--- a/src/gui/creds/httpcredentialsgui.cpp
+++ b/src/gui/creds/httpcredentialsgui.cpp
@@ -43,16 +43,18 @@ void HttpCredentialsGui::askFromUser()
void HttpCredentialsGui::askFromUserAsync()
{
- if (Theme::instance()->noUnauthedRequests()) {
- performOAuthProcess();
- return;
- }
-
// First, we will check what kind of auth we need.
auto job = new DetermineAuthTypeJob(_account->sharedFromThis(), this);
QObject::connect(job, &DetermineAuthTypeJob::authType, this, [this](DetermineAuthTypeJob::AuthType type) {
if (type == DetermineAuthTypeJob::OAuth) {
- performOAuthProcess();
+ _asyncAuth.reset(new OAuth(_account, this));
+ _asyncAuth->_expectedUser = _account->davUser();
+ connect(_asyncAuth.data(), &OAuth::result,
+ this, &HttpCredentialsGui::asyncAuthResult);
+ connect(_asyncAuth.data(), &OAuth::destroyed,
+ this, &HttpCredentialsGui::authorisationLinkChanged);
+ _asyncAuth->start();
+ emit authorisationLinkChanged();
} else if (type == DetermineAuthTypeJob::Basic) {
showDialog();
} else {
@@ -64,20 +66,6 @@ void HttpCredentialsGui::askFromUserAsync()
job->start();
}
-void HttpCredentialsGui::performOAuthProcess()
-{
- _asyncAuth.reset(new OAuth(_account, this));
- _asyncAuth->_expectedUser = _account->davUser();
- connect(_asyncAuth.data(), &OAuth::result,
- this, &HttpCredentialsGui::asyncAuthResult);
- connect(_asyncAuth.data(), &OAuth::destroyed,
- this, &HttpCredentialsGui::authorisationLinkChanged);
- connect(_asyncAuth.data(), &OAuth::authorisationLinkChanged,
- this, &HttpCredentialsGui::authorisationLinkChanged);
- _asyncAuth->start();
- emit authorisationLinkChanged();
-}
-
void HttpCredentialsGui::asyncAuthResult(OAuth::Result r, const QString &user,
const QString &token, const QString &refreshToken)
{
diff --git a/src/gui/creds/httpcredentialsgui.h b/src/gui/creds/httpcredentialsgui.h
index a4973ce94..c49a45e27 100644
--- a/src/gui/creds/httpcredentialsgui.h
+++ b/src/gui/creds/httpcredentialsgui.h
@@ -59,7 +59,6 @@ public:
static QString requestAppPasswordText(const Account *account);
private slots:
- void performOAuthProcess();
void asyncAuthResult(OAuth::Result, const QString &user, const QString &accessToken, const QString &refreshToken);
void showDialog();
void askFromUserAsync();