fixup! Sharing: redirect to download after authentification if requested

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-02-28 17:08:25 +01:00
parent fb890807c0
commit a0641e43dc
No known key found for this signature in database
GPG key ID: FB5ACEED51955BF8

View file

@ -185,10 +185,17 @@ class ShareController extends Controller {
$authenticate = $this->linkShareAuth($share, $password);
// if download was requested before auth, redirect to download
if ($authenticate === true && $redirect === 'download') {
return new RedirectResponse($this->urlGenerator->linkToRoute('files_sharing.sharecontroller.downloadShare', array('token' => $token)));
return new RedirectResponse($this->urlGenerator->linkToRoute(
'files_sharing.sharecontroller.downloadShare',
array('token' => $token))
);
} else if ($authenticate === true) {
return new RedirectResponse($this->urlGenerator->linkToRoute('files_sharing.sharecontroller.showShare', array('token' => $token)));
return new RedirectResponse($this->urlGenerator->linkToRoute(
'files_sharing.sharecontroller.showShare',
array('token' => $token))
);
}
$response = new TemplateResponse($this->appName, 'authenticate', array('wrongpw' => true), 'guest');