[Pkg-owncloud-commits] [owncloud-client] 73/121: AccountManager: Don't force the server URL while loading the config.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Jul 28 15:32:00 UTC 2016


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 dff57362f95b11d22b03684ab825c9a14bec4942
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Jun 28 14:27:00 2016 +0200

    AccountManager: Don't force the server URL while loading the config.
    
    While loading the account, only override the server url if Theme::forceConfigAuthType
    is set. This restore the behavior from the client 2.1 for theme that did not
    use Theme::forceConfigAuthType.
    
    Issue: owncloud/enterprise#1418
---
 src/gui/accountmanager.cpp | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp
index e4b386d..421ee0a 100644
--- a/src/gui/accountmanager.cpp
+++ b/src/gui/accountmanager.cpp
@@ -213,14 +213,12 @@ AccountPtr AccountManager::loadAccountHelper(QSettings& settings)
 
     QString authType = settings.value(QLatin1String(authTypeC)).toString();
     QString overrideUrl = Theme::instance()->overrideServerUrl();
-    if( !overrideUrl.isEmpty() ) {
-        // if there is a overrideUrl, don't even bother reading from the config as all the accounts
-        // must use the overrideUrl
+    QString forceAuth = Theme::instance()->forceConfigAuthType();
+    if(!forceAuth.isEmpty() && !overrideUrl.isEmpty() ) {
+        // If forceAuth is set, this might also mean the overrideURL has changed.
+        // See enterprise issues #1126
         acc->setUrl(overrideUrl);
-        auto forceAuth = Theme::instance()->forceConfigAuthType();
-        if (!forceAuth.isEmpty()) {
-            authType = forceAuth;
-        }
+        authType = forceAuth;
     } else {
         acc->setUrl(settings.value(QLatin1String(urlC)).toUrl());
     }

-- 
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