[Pkg-owncloud-commits] [owncloud-client] 461/484: Account: Invalidate credentials when clicking "Sign out" #4241
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:38:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit a75209d104c7cd595451e8a57b77a66d323fcca8
Author: Markus Goetz <markus at woboq.com>
Date: Wed Dec 2 16:31:58 2015 +0100
Account: Invalidate credentials when clicking "Sign out" #4241
---
src/gui/accountsettings.cpp | 8 ++++++--
src/gui/owncloudgui.cpp | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 836a156..275ac91 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -160,10 +160,14 @@ void AccountSettings::slotOpenAccountWizard()
OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)), 0);
}
+// FIXME: Use same code path as ownCloudGui::slotLogout()
void AccountSettings::slotToggleSignInState()
{
- bool signedInState = _accountState->isSignedOut();
- _accountState->setSignedOut( !signedInState );
+ bool signedOutState = _accountState->isSignedOut();
+ if (!signedOutState) {
+ _accountState->account()->credentials()->invalidateToken();
+ }
+ _accountState->setSignedOut( !signedOutState );
}
void AccountSettings::doExpand()
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index af8dc1b..fd82315 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -637,6 +637,7 @@ void ownCloudGui::slotLogin()
}
}
+// FIXME: Unify codepath with AccountSettings::slotToggleSignInState()
void ownCloudGui::slotLogout()
{
auto list = AccountManager::instance()->accounts();
--
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