Handle NeedToSignTermsOfService account state in file provider components

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-11-20 15:19:31 +08:00 коммит произвёл Matthieu Gallien
Родитель 7e6ae848b0
Коммит 624ecbaefd
3 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -581,6 +581,7 @@ void FileProviderDomainManager::slotAccountStateChanged(const AccountState * con
break; break;
case AccountState::SignedOut: case AccountState::SignedOut:
case AccountState::AskingCredentials: case AccountState::AskingCredentials:
case AccountState::NeedToSignTermsOfService:
{ {
// Disconnect File Provider domain while unauthenticated // Disconnect File Provider domain while unauthenticated
const auto trReason = tr("This account is not authenticated. Please check your account state in the %1 application.").arg(APPLICATION_NAME); const auto trReason = tr("This account is not authenticated. Please check your account state in the %1 application.").arg(APPLICATION_NAME);

Просмотреть файл

@ -174,6 +174,7 @@ void FileProviderSocketController::slotAccountStateChanged(const AccountState::S
case AccountState::SignedOut: case AccountState::SignedOut:
case AccountState::AskingCredentials: case AccountState::AskingCredentials:
case AccountState::RedirectDetected: case AccountState::RedirectDetected:
case AccountState::NeedToSignTermsOfService:
// Notify File Provider that it should show the not authenticated message // Notify File Provider that it should show the not authenticated message
sendNotAuthenticated(); sendNotAuthenticated();
break; break;

Просмотреть файл

@ -101,6 +101,7 @@ void FileProviderXPC::slotAccountStateChanged(const AccountState::State state) c
case AccountState::SignedOut: case AccountState::SignedOut:
case AccountState::AskingCredentials: case AccountState::AskingCredentials:
case AccountState::RedirectDetected: case AccountState::RedirectDetected:
case AccountState::NeedToSignTermsOfService:
// Notify File Provider that it should show the not authenticated message // Notify File Provider that it should show the not authenticated message
unauthenticateExtension(extensionAccountId); unauthenticateExtension(extensionAccountId);
break; break;