HttpCreds: Update app passwords url #5605
authorChristian Kamm <mail@ckamm.de>
Tue, 14 Mar 2017 14:59:22 +0000 (15:59 +0100)
committerMarkus Goetz <markus@woboq.com>
Wed, 15 Mar 2017 15:30:08 +0000 (16:30 +0100)
See also owncloud/core#27360

src/gui/creds/httpcredentialsgui.cpp

index 26ad6ec8b67958f1f8dfea415d4561210c182f49..8eb5c40ee6ad2e1fa811648de598a1448aacdcbf 100644 (file)
@@ -75,7 +75,12 @@ QString HttpCredentialsGui::requestAppPasswordText(const Account* account)
         return QString();
     }
 
-    QString path = QLatin1String("/index.php/settings/personal?section=apppasswords");
+    QString path;
+    if (account->serverVersionInt() < Account::makeServerVersion(10, 0, 0)) {
+        path = QLatin1String("/index.php/settings/personal?section=apppasswords");
+    } else {
+        path = QLatin1String("/index.php/settings/personal?sectionid=security#apppasswords");
+    }
     return tr("<a href=\"%1\">Click here</a> to request an app password from the web interface.")
         .arg(account->url().toString() + path);
 }