From: Olivier Goffart Date: Tue, 28 Jun 2016 12:27:00 +0000 (+0200) Subject: AccountManager: Don't force the server URL while loading the config. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1137^2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dff57362f95b11d22b03684ab825c9a14bec4942;p=nextcloud-desktop.git 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 --- diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index e4b386d76..421ee0add 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()); }