Finish cleaning up shibboleth
authorKevin Ottens <kevin.ottens@enioka.com>
Thu, 11 Mar 2021 14:25:49 +0000 (15:25 +0100)
committerallexzander (Rebase PR Action) <allexzander@users.noreply.github.com>
Mon, 15 Mar 2021 09:38:15 +0000 (09:38 +0000)
There were a couple of shibboleth related enums left, since that auth
method isn't supported anymore remove the code tied to those enums. It
was dead code anyway.

Signed-off-by: Kevin Ottens <kevin.ottens@enioka.com>
src/gui/owncloudsetupwizard.cpp
src/gui/wizard/owncloudsetuppage.cpp
src/gui/wizard/owncloudwizardcommon.h
src/libsync/networkjobs.cpp
src/libsync/networkjobs.h

index 51c727208a148840d4199ab58d88c48aa83fc8e8..794cf8661baab27206bc6b277b50b354acfa4934 100644 (file)
@@ -86,17 +86,6 @@ bool OwncloudSetupWizard::bringWizardToFrontIfVisible()
         return false;
     }
 
-    if (wiz->_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds) {
-        // Try to find if there is a browser open and raise that instead (Issue #6105)
-        const auto allWindow = qApp->topLevelWidgets();
-        auto it = std::find_if(allWindow.cbegin(), allWindow.cend(), [](QWidget *w)
-            { return QLatin1String(w->metaObject()->className()) == QLatin1String("OCC::ShibbolethWebView"); });
-        if (it != allWindow.cend()) {
-            ownCloudGui::raiseDialog(*it);
-            return true;
-        }
-    }
-
     ownCloudGui::raiseDialog(wiz->_ocWizard);
     return true;
 }
@@ -413,7 +402,7 @@ void OwncloudSetupWizard::slotAuthError()
 
     // bring wizard to top
     _ocWizard->bringToTop();
-    if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) {
+    if (_ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) {
         _ocWizard->back();
     }
     _ocWizard->displayError(errorMsg, _ocWizard->currentId() == WizardCommon::Page_ServerSetup && checkDowngradeAdvised(reply));
index 800d965d65dfcf4a888b4b6a0a5f1bc120e7bba4..fa8a221d0707bd852b34e613bca464a37c69de05 100644 (file)
@@ -228,8 +228,6 @@ int OwncloudSetupPage::nextId() const
         return WizardCommon::Page_OAuthCreds;
     case DetermineAuthTypeJob::LoginFlowV2:
         return WizardCommon::Page_Flow2AuthCreds;
-    case DetermineAuthTypeJob::Shibboleth:
-        return WizardCommon::Page_ShibbolethCreds;
     case DetermineAuthTypeJob::WebViewFlow:
         return WizardCommon::Page_WebView;
     }
index 5ebcca01fc953f53e639b7791469ac2e1ff8a3a0..30b4dfb805aae3cac01c34a9b5c7b173055ad176 100644 (file)
@@ -44,7 +44,6 @@ namespace WizardCommon {
         Page_Welcome,
         Page_ServerSetup,
         Page_HttpCreds,
-        Page_ShibbolethCreds,
         Page_OAuthCreds,
         Page_Flow2AuthCreds,
         Page_WebView,
index ac09a6a4daad70b5e546380831ff3ac612584f3f..3f5a05369e942ab4bae92ca9d5cbd0b9e5879d9e 100644 (file)
@@ -919,11 +919,6 @@ void DetermineAuthTypeJob::start()
     propfind->setIgnoreCredentialFailure(true);
     oldFlowRequired->setIgnoreCredentialFailure(true);
 
-    connect(get, &AbstractNetworkJob::redirected, this, [this, get](QNetworkReply *, const QUrl &target, int) {
-        Q_UNUSED(this)
-        Q_UNUSED(get)
-        Q_UNUSED(target)
-    });
     connect(get, &SimpleNetworkJob::finishedSignal, this, [this]() {
         _getDone = true;
         checkAllDone();
@@ -968,16 +963,13 @@ void DetermineAuthTypeJob::checkAllDone()
     }
 
     auto result = _resultPropfind;
-    // OAuth > Shib > Basic
-    if (_resultGet == Shibboleth && result != OAuth)
-        result = Shibboleth;
 
-    // WebViewFlow > OAuth > Shib > Basic
+    // WebViewFlow > OAuth > Basic
     if (_account->serverVersionInt() >= Account::makeServerVersion(12, 0, 0)) {
         result = WebViewFlow;
     }
 
-    // LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic
+    // LoginFlowV2 > WebViewFlow > OAuth > Basic
     if (_account->serverVersionInt() >= Account::makeServerVersion(16, 0, 0)) {
         result = LoginFlowV2;
     }
index 03635a964a210f9963aeefa60c0a2069c7f4fb68..99fd1d1f68a9d77f6ac164e468d74fb3ee18df01 100644 (file)
@@ -439,7 +439,6 @@ public:
     enum AuthType {
         Basic, // also the catch-all fallback for backwards compatibility reasons
         OAuth,
-        Shibboleth,
         WebViewFlow,
         LoginFlowV2
     };