allow registration to be disabled via config
This commit is contained in:
parent
9d4f3f8ce1
commit
79b55c430d
2 changed files with 8 additions and 3 deletions
|
@ -2519,7 +2519,6 @@ sub startup {
|
|||
$r->get('/login')->to('account#login_form');
|
||||
$r->get('/recover')->to('account#request_password_reset');
|
||||
$r->get('/recover/:id/:token')->to('account#recover_password');
|
||||
$r->get('/register')->to('account#registration_form');
|
||||
$r->get('/reg/:id/:token')->to('account#verify');
|
||||
$r->get('/status/:name')->to('traveling#user_status');
|
||||
$r->get('/status/:name/:ts')->to('traveling#user_status');
|
||||
|
@ -2533,9 +2532,13 @@ sub startup {
|
|||
$r->post('/geolocation')->to('traveling#geolocation');
|
||||
$r->post('/list_departures')->to('traveling#redirect_to_station');
|
||||
$r->post('/login')->to('account#do_login');
|
||||
$r->post('/register')->to('account#register');
|
||||
$r->post('/recover')->to('account#request_password_reset');
|
||||
|
||||
if ( not $self->config->{registration}{disabled} ) {
|
||||
$r->get('/register')->to('account#registration_form');
|
||||
$r->post('/register')->to('account#register');
|
||||
}
|
||||
|
||||
my $authed_r = $r->under(
|
||||
sub {
|
||||
my ($self) = @_;
|
||||
|
|
|
@ -112,7 +112,9 @@
|
|||
<div class="col s1 m1 l3">
|
||||
</div>
|
||||
<div class="col s10 m10 l6 center-align">
|
||||
% if (not app->config->{registration}{disabled}) {
|
||||
<a href="/register" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">add</i>Registrieren</a>
|
||||
% }
|
||||
<a href="/login" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">account_circle</i>Anmelden</a>
|
||||
</div>
|
||||
<div class="col s1 m1 l3">
|
||||
|
|
Loading…
Reference in a new issue