diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp index a69f5ef17356..59f26fe7cc54 100644 --- a/src/gui/accountstate.cpp +++ b/src/gui/accountstate.cpp @@ -64,6 +64,10 @@ AccountState::AccountState(const AccountPtr &account) this, &AccountState::slotPushNotificationsReady); connect(account.data(), &Account::serverUserStatusChanged, this, &AccountState::slotServerUserStatusChanged); + connect(account.data(), &Account::termsOfServiceNeedToBeChecked, + this, [this] () { + checkConnectivity(); + }); connect(this, &AccountState::isConnectedChanged, [=]{ // Get the Apps available on the server if we're now connected. diff --git a/src/libsync/account.h b/src/libsync/account.h index 4afd9f654dc3..92a132ef6c48 100644 --- a/src/libsync/account.h +++ b/src/libsync/account.h @@ -464,6 +464,7 @@ public slots: void downloadLimitSettingChanged(); void uploadLimitChanged(); void downloadLimitChanged(); + void termsOfServiceNeedToBeChecked(); protected Q_SLOTS: void slotCredentialsFetched(); diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 38e4a424c5a7..4cb604b9aa7d 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -652,6 +652,10 @@ void DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply *r) msg = tr("Server error: PROPFIND reply is not XML formatted!"); } + if (r->error() == QNetworkReply::ContentAccessDenied) { + emit _account->termsOfServiceNeedToBeChecked(); + } + emit finished(HttpError{ httpCode, msg }); deleteLater(); }