Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
const auto overrideUrl = Theme::instance()->overrideServerUrl();
const auto forceAuth = Theme::instance()->forceConfigAuthType();
- if (!forceAuth.isEmpty() && !overrideUrl.isEmpty()) {
+ const auto multipleOverrideServers = Theme::instance()->multipleOverrideServers();
+ if (!forceAuth.isEmpty() && !overrideUrl.isEmpty() && !multipleOverrideServers) {
// If forceAuth is set, this might also mean the overrideURL has changed.
// See enterprise issues #1126
acc->setUrl(overrideUrl);
{
AccountPtr account = AccountManager::createAccount();
account->setCredentials(CredentialsFactory::create("dummy"));
- account->setUrl(Theme::instance()->overrideServerUrl());
+ const auto defaultUrl =
+ Theme::instance()->multipleOverrideServers() ? QString{} : Theme::instance()->overrideServerUrl();
+ account->setUrl(defaultUrl);
_ocWizard->setAccount(account);
_ocWizard->setOCUrl(account->url().toString());