fixup! Sharing: redirect to download after authentification if requested
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
fb890807c0
commit
a0641e43dc
1 changed files with 9 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue