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

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJocelyn Turcotte <jturcotte@woboq.com>2016-01-21 15:33:03 +0300
committerJocelyn Turcotte <jturcotte@woboq.com>2016-01-22 16:25:36 +0300
commit8486a2fd2be03c7d2eeb0ad8539c23e2bdf5a7b6 (patch)
treeff4fec148658a26d4b36cc33bbc208298e36d688 /src/gui/accountstate.cpp
parentf15f4aa8861eab42782d5836ed935c902863c555 (diff)
Bring back the automatic authentication popups
Users have complained that they don't see the notification when it is shown and are not aware that their files aren't syncing. Remove the non-interactive credentials fetch logic and add make sure that the shibboleth popup will flash in the taskbar instead. This will still not allow the popup to show in front in all cases, but this is a compromise that we have to chose. This reverts commit dcb687929f1323e9fea8a9e4bd48cdd3fa8312d9. Issue https://github.com/owncloud/enterprise/issues/990
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r--src/gui/accountstate.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index 1f93932af..7a14b2d5d 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -30,7 +30,6 @@ AccountState::AccountState(AccountPtr account)
, _state(AccountState::Disconnected)
, _connectionStatus(ConnectionValidator::Undefined)
, _waitingForNewCredentials(false)
- , _credentialsFetchMode(Interactive)
{
qRegisterMetaType<AccountState*>("AccountState*");
@@ -84,7 +83,7 @@ void AccountState::setState(State state)
_connectionStatus = ConnectionValidator::Undefined;
_connectionErrors.clear();
} else if (oldState == SignedOut && _state == Disconnected) {
- checkConnectivity(Interactive);
+ checkConnectivity();
}
}
@@ -145,7 +144,7 @@ void AccountState::tagLastSuccessfullETagRequest()
_timeSinceLastETagCheck.restart();
}
-void AccountState::checkConnectivity(CredentialFetchMode credentialsFetchMode)
+void AccountState::checkConnectivity()
{
if (isSignedOut() || _waitingForNewCredentials) {
return;
@@ -167,7 +166,6 @@ void AccountState::checkConnectivity(CredentialFetchMode credentialsFetchMode)
return;
}
- _credentialsFetchMode = credentialsFetchMode;
ConnectionValidator * conValidator = new ConnectionValidator(account());
_connectionValidator = conValidator;
connect(conValidator, SIGNAL(connectionResult(ConnectionValidator::Status,QStringList)),
@@ -261,13 +259,7 @@ void AccountState::slotCredentialsFetched(AbstractCredentials* credentials)
{
if (!credentials->ready()) {
// No exiting credentials found in the keychain
- if (_credentialsFetchMode == Interactive)
- credentials->askFromUser();
- else {
- Logger::instance()->postOptionalGuiLog(tr("Reauthentication required"), tr("You need to re-login to continue using the account %1.").arg(_account->displayName()));
- setState(SignedOut);
- _waitingForNewCredentials = false;
- }
+ credentials->askFromUser();
return;
}
@@ -277,7 +269,7 @@ void AccountState::slotCredentialsFetched(AbstractCredentials* credentials)
// connection validation, even if it's currently running.
delete _connectionValidator;
- checkConnectivity(_credentialsFetchMode);
+ checkConnectivity();
}
void AccountState::slotCredentialsAsked(AbstractCredentials* credentials)
@@ -294,7 +286,7 @@ void AccountState::slotCredentialsAsked(AbstractCredentials* credentials)
// connection validation, even if it's currently running.
delete _connectionValidator;
- checkConnectivity(_credentialsFetchMode);
+ checkConnectivity();
}
std::unique_ptr<QSettings> AccountState::settings()