Performed review of "public intended" functionality provided in #1817

- Updated logic to take url from referrer rather than pass as a query parameter.
- Added tests to cover functionality.
- Updated 404 page with login action button if not signed in.
- Updated 404 page with text to indicate permissions may be affecting visibility.

Related to #1817 and #1706
This commit is contained in:
Dan Brown
2020-03-14 18:29:31 +00:00
parent a95588dc2e
commit 7f6cbead33
5 changed files with 62 additions and 15 deletions

View File

@ -76,8 +76,9 @@ class LoginController extends Controller
]);
}
if ($request->has('intended')) {
redirect()->setIntendedUrl($request->get('intended'));
$previous = url()->previous('');
if (setting('app-public') && $previous && $previous !== url('/login')) {
redirect()->setIntendedUrl($previous);
}
return view('auth.login', [