diff options
author | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-07-01 15:13:08 +0200 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-07-01 15:13:08 +0200 |
commit | e478db9161990d004d42dbae07436d6e881fc137 (patch) | |
tree | 94c037b635b1179cc711927703d65f0ea5fc418a /core/Controller | |
parent | 2c7186a15f81d084617b43e5cfbf9c6c34189667 (diff) | |
download | nextcloud-server-e478db9161990d004d42dbae07436d6e881fc137.tar.gz nextcloud-server-e478db9161990d004d42dbae07436d6e881fc137.zip |
Deprecate RedirectToDefaultAppResponse
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/LoginController.php | 5 | ||||
-rw-r--r-- | core/Controller/TwoFactorChallengeController.php | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 5ef40429120..15ec8365c19 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -42,7 +42,6 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\RedirectResponse; -use OCP\AppFramework\Http\RedirectToDefaultAppResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\Defaults; use OCP\IConfig; @@ -150,7 +149,7 @@ class LoginController extends Controller { */ public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response { if ($this->userSession->isLoggedIn()) { - return new RedirectToDefaultAppResponse(); + return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl()); } $loginMessages = $this->session->get('loginMessages'); @@ -274,7 +273,7 @@ class LoginController extends Controller { return new RedirectResponse($location); } } - return new RedirectToDefaultAppResponse(); + return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl()); } /** diff --git a/core/Controller/TwoFactorChallengeController.php b/core/Controller/TwoFactorChallengeController.php index c343321a868..f23df5aea28 100644 --- a/core/Controller/TwoFactorChallengeController.php +++ b/core/Controller/TwoFactorChallengeController.php @@ -29,7 +29,6 @@ use OC\Authentication\TwoFactorAuth\Manager; use OC_User; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\RedirectResponse; -use OCP\AppFramework\Http\RedirectToDefaultAppResponse; use OCP\AppFramework\Http\StandaloneTemplateResponse; use OCP\Authentication\TwoFactorAuth\IActivatableAtLogin; use OCP\Authentication\TwoFactorAuth\IProvider; @@ -197,7 +196,7 @@ class TwoFactorChallengeController extends Controller { if (!is_null($redirect_url)) { return new RedirectResponse($this->urlGenerator->getAbsoluteURL(urldecode($redirect_url))); } - return new RedirectToDefaultAppResponse(); + return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl()); } } catch (TwoFactorException $e) { /* |