Update config and header for new auth class
This commit is contained in:
parent
a18f1926d9
commit
87f5324761
@ -11,21 +11,33 @@ return [
|
||||
'update' => [
|
||||
'path' => '/{controller}/update',
|
||||
'action' => 'update',
|
||||
'verb' => 'post'
|
||||
'verb' => 'post',
|
||||
'tokens' => [
|
||||
'controller' => '[a-z_]+'
|
||||
]
|
||||
],
|
||||
'login_form' => [
|
||||
'path' => '/{controller}/login',
|
||||
'action' => 'login',
|
||||
'verb' => 'get'
|
||||
'verb' => 'get',
|
||||
'tokens' => [
|
||||
'controller' => '[a-z_]+'
|
||||
]
|
||||
],
|
||||
'login_action' => [
|
||||
'path' => '/{controller}/login',
|
||||
'action' => 'login_action',
|
||||
'verb' => 'post'
|
||||
'verb' => 'post',
|
||||
'tokens' => [
|
||||
'controller' => '[a-z_]+'
|
||||
]
|
||||
],
|
||||
'logout' => [
|
||||
'path' => '/{controller}/logout',
|
||||
'action' => 'logout'
|
||||
'action' => 'logout',
|
||||
'tokens' => [
|
||||
'controller' => '[a-z_]+'
|
||||
]
|
||||
],
|
||||
],
|
||||
// Routes on collection controller
|
||||
|
@ -17,11 +17,11 @@
|
||||
</a> [<a href="<?= $urlGenerator->default_url($other_type) ?>"><?= ucfirst($other_type) ?> List</a>]
|
||||
</span>
|
||||
<span class="flex-no-wrap small-font">
|
||||
<?php /*if (is_logged_in()): ?>
|
||||
<?php if ($auth->is_authenticated()): ?>
|
||||
[<a href="<?= $urlGenerator->url("/{$url_type}/logout", $url_type) ?>">Logout</a>]
|
||||
<?php else: ?>
|
||||
[<a href="<?= $urlGenerator->url("/{$url_type}/login", $url_type) ?>"><?= $config->whose_list ?>'s Login</a>]
|
||||
<?php endif */ ?>
|
||||
[<a href="<?= $urlGenerator->url("/{$url_type}/login", $url_type) ?>"><?= $config->get('whose_list') ?>'s Login</a>]
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</h1>
|
||||
<nav>
|
||||
|
Loading…
Reference in New Issue
Block a user