mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
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
This commit is contained in:
parent
05a7c18635
commit
dff57362f9
1 changed files with 5 additions and 7 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue