login form: add hint about pages being only visibile after login

This commit is contained in:
Derf Null 2023-06-09 07:55:59 +02:00
parent 88ede7e308
commit 0516344ac0
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA
2 changed files with 14 additions and 1 deletions

View file

@ -2229,7 +2229,11 @@ sub startup {
if ( $self->is_user_authenticated ) { if ( $self->is_user_authenticated ) {
return 1; return 1;
} }
$self->render( 'login', redirect_to => $self->req->url ); $self->render(
'login',
redirect_to => $self->req->url,
from => 'auth_required'
);
return undef; return undef;
} }
); );

View file

@ -44,6 +44,15 @@
</div> </div>
</div> </div>
% } % }
% elsif ($from eq 'auth_required') {
<div class="card">
<div class="card-content">
<span class="card-title">Login notwendig</span>
<p>Die aufgerufene Seite ist nur mit travelynx-Account zugänglich.</p>
<p><a href="/">Über travelynx</a> · <a href="/register">Registrieren</a></p>
</div>
</div>
% }
</div> </div>
</div> </div>
% } % }