Handle NeedToSignTermsOfService account state in file provider components
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 20 Nov 2024 07:19:31 +0000 (15:19 +0800)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 20 Nov 2024 15:27:09 +0000 (16:27 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/macOS/fileproviderdomainmanager_mac.mm
src/gui/macOS/fileprovidersocketcontroller.cpp
src/gui/macOS/fileproviderxpc_mac.mm

index e433717047844deff712877e8cb6bee093772e37..38a51c959584bbd8e1baeeb8032ab9d32284f572 100644 (file)
@@ -581,6 +581,7 @@ void FileProviderDomainManager::slotAccountStateChanged(const AccountState * con
         break;
     case AccountState::SignedOut:
     case AccountState::AskingCredentials:
+    case AccountState::NeedToSignTermsOfService:
     {
         // 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);
index 44fca50f27f38adb8aa0a27f9ebdc3de42123dc0..b8d09abf8313bb5addeeb1e000da13c763f283b9 100644 (file)
@@ -174,6 +174,7 @@ void FileProviderSocketController::slotAccountStateChanged(const AccountState::S
     case AccountState::SignedOut:
     case AccountState::AskingCredentials:
     case AccountState::RedirectDetected:
+    case AccountState::NeedToSignTermsOfService:
         // Notify File Provider that it should show the not authenticated message
         sendNotAuthenticated();
         break;
index 965f826c5f8ebfe4605be27fdb1f716df4155a3a..cc4b14a2aff0850f5c0fb2e888ee5dc6989b5834 100644 (file)
@@ -101,6 +101,7 @@ void FileProviderXPC::slotAccountStateChanged(const AccountState::State state) c
     case AccountState::SignedOut:
     case AccountState::AskingCredentials:
     case AccountState::RedirectDetected:
+    case AccountState::NeedToSignTermsOfService:
         // Notify File Provider that it should show the not authenticated message
         unauthenticateExtension(extensionAccountId);
         break;