mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
content access denied error during discovery: verify server access
will trigger a check of the server connectivity in case of content access denied reporting when listing folders during discovery should allow discovering early that terms of service need to be signed Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
d6ba757585
commit
4a1538b6c4
3 changed files with 9 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -464,6 +464,7 @@ signals:
|
|||
void downloadLimitSettingChanged();
|
||||
void uploadLimitChanged();
|
||||
void downloadLimitChanged();
|
||||
void termsOfServiceNeedToBeChecked();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void slotCredentialsFetched();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue