зеркало из https://github.com/nextcloud/desktop.git
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:
Родитель
8ddf11d960
Коммит
968289cbf0
|
@ -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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче