Move token regeneration to the advanced config section

And make clear which services get a new token.
This commit is contained in:
Mathias Kresin 2015-01-03 23:39:00 +01:00
parent e349921322
commit f3f0881758
3 changed files with 2 additions and 3 deletions

View File

@ -89,7 +89,7 @@ Router\get_action('generate-tokens', function() {
Model\Config\new_tokens();
}
Response\redirect('?action=api');
Response\redirect('?action=config');
});
// Optimize the database manually
@ -204,7 +204,6 @@ Router\get_action('database', function() {
Router\get_action('api', function() {
Response\html(Template\layout('api', array(
'csrf' => Model\Config\generate_csrf(),
'config' => Model\Config\get_all(),
'menu' => 'config',
'title' => t('API')

View File

@ -23,7 +23,6 @@
<li><?= t('API endpoint:') ?> <strong><?= Helper\get_current_base_url().'jsonrpc.php' ?></strong></li>
<li><?= t('API username:') ?> <strong><?= Helper\escape($config['username']) ?></strong></li>
<li><?= t('API token:') ?> <strong><?= Helper\escape($config['api_token']) ?></strong></li>
<li><a href="?action=generate-tokens&amp;csrf=<?= $csrf ?>"><?= t('Generate new tokens') ?></a></li>
</ul>
</div>
</section>

View File

@ -75,6 +75,7 @@
</div>
<section class="alert alert-error">
<ul>
<li><a href="?action=generate-tokens&amp;csrf=<?= $values['csrf'] ?>"><?= t('Generate new tokens') ?></a> (<?= t('Miniflux API') ?>, <?= t('Fever API') ?>, <?= t('Bookmarklet') ?>, <?= t('Bookmark RSS Feed') ?>)</li>
<li><a href="?action=confirm-auto-update"><?= t('Update Miniflux') ?></a> (<?= t('Don\'t forget to backup your database') ?>)</li>
</ul>
</section>