[Pkg-owncloud-commits] [owncloud-client] 31/33: Revert "Make "Sign Out" forget the cookies"

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Feb 27 19:44:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch upstream
in repository owncloud-client.

commit d4dd5afbe7432c1b05172ff0ad95a0faa1d3ac62
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Wed Feb 26 15:05:08 2014 +0100

    Revert "Make "Sign Out" forget the cookies"
    
    This reverts commit 86073001952796ef1fcdcc2605ff00ec98c22c17.
    
    This approach is too dangerous for 1.5.2.
---
 src/mirall/account.cpp     | 12 ------------
 src/mirall/account.h       |  1 -
 src/mirall/application.cpp |  9 ++++-----
 3 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp
index feb0ac0..6a15773 100644
--- a/src/mirall/account.cpp
+++ b/src/mirall/account.cpp
@@ -342,16 +342,4 @@ void Account::slotHandleErrors(QNetworkReply *reply , QList<QSslError> errors)
     }
 }
 
-
-void Account::singOut()
-{
-    credentials()->invalidateToken(this);
-    if (_am) {
-        // Forget all cookies
-        _am->setCookieJar(new QNetworkCookieJar);
-    }
-    setState(Account::SignedOut);
-}
-
-
 } // namespace Mirall
diff --git a/src/mirall/account.h b/src/mirall/account.h
index 4c00c84..6d8df04 100644
--- a/src/mirall/account.h
+++ b/src/mirall/account.h
@@ -145,7 +145,6 @@ public:
     void setState(int state);
 
     QuotaInfo *quotaInfo();
-    void singOut();
 signals:
     void stateChanged(int state);
 
diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp
index 8424207..de84466 100644
--- a/src/mirall/application.cpp
+++ b/src/mirall/application.cpp
@@ -174,16 +174,15 @@ void Application::slotLogout()
 {
     Account *a = AccountManager::instance()->account();
     if (a) {
-        // forget the password and cookies and change the state
-        a->singOut();
-
+        // invalidate & forget token/password
+        a->credentials()->invalidateToken(a);
         // terminate all syncs and unload folders
         FolderMan *folderMan = FolderMan::instance();
         folderMan->setSyncEnabled(false);
         folderMan->terminateSyncProcess();
         folderMan->unloadAllFolders();
-
-        // Show result
+        a->setState(Account::SignedOut);
+        // show result
         _gui->slotComputeOverallSyncStatus();
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list