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

@ -83,6 +83,7 @@ return [
// Error pages
'404_page_not_found' => 'Page Not Found',
'sorry_page_not_found' => 'Sorry, The page you were looking for could not be found.',
'sorry_page_not_found_permission_warning' => 'If you expected this page to exist, you might not have permission to view it.',
'return_home' => 'Return to home',
'error_occurred' => 'An Error Occurred',
'app_down' => ':appName is down right now',

View File

@ -45,7 +45,7 @@
@if(setting('registration-enabled') && config('auth.method') === 'standard')
<a href="{{ url('/register') }}">@icon('new-user'){{ trans('auth.sign_up') }}</a>
@endif
<a href="{{ action('Auth\LoginController@getLogin', ['intended' => url()->current()]) }}">@icon('login'){{ trans('auth.log_in') }}</a>
<a href="{{ url('/login') }}">@icon('login'){{ trans('auth.log_in') }}</a>
@endif
</div>
@if(signedInUser())

View File

@ -3,13 +3,17 @@
@section('content')
<div class="container mt-l">
<div class="card mb-xl px-l pb-xl pt-l">
<div class="card mb-xl px-l pb-l pt-l">
<div class="grid half v-center">
<div>
<h1 class="list-heading">{{ $message ?? trans('errors.404_page_not_found') }}</h1>
<h5>{{ trans('errors.sorry_page_not_found') }}</h5>
<p>{{ trans('errors.sorry_page_not_found_permission_warning') }}</p>
</div>
<div class="text-right">
@if(!signedInUser())
<a href="{{ url('/login') }}" class="button outline">{{ trans('auth.log_in') }}</a>
@endif
<a href="{{ url('/') }}" class="button outline">{{ trans('errors.return_home') }}</a>
</div>
</div>