Fixed 'forbidden' on /admin

Fixed logout menu item position in Firefox
This commit is contained in:
Mark van Renswoude 2018-05-31 14:42:55 +02:00
parent d6f553e99f
commit b2ab541fa6
3 changed files with 9 additions and 6 deletions

View File

@ -108,9 +108,8 @@ const webpackConfigFactory = require('./webpack.config.js');
app.use(express.static(path.join(__dirname, 'public', 'dist')));
// Redirects to make Vue-router URLs less quirky
// Redirect to make Vue-router URLs less quirky
app.get('/c/:code', (req, res) => { res.redirect(301, '/#/c/' + req.params.code) });
app.get('/admin', (req, res) => { res.redirect(301, '/#/admin/') });
// Background workers

View File

@ -63,6 +63,10 @@ async function checkAuthorization(req, res, repository, onVerified)
module.exports = (repository) =>
{
var router = express.Router();
// Redirects to make Vue-router URLs less quirky
router.get('/', (req, res) => { res.redirect(301, '/#/admin/') });
router.use(async (req, res, next) =>
{
try

View File

@ -3,13 +3,13 @@
<div class="container">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
<menu-link route="/admin/uploads" :title="$t('admin.menu.uploads')"></menu-link>
<menu-link route="/admin/codes" :title="$t('admin.menu.codes')"></menu-link>
<menu-link route="/admin/users" :title="$t('admin.menu.users')" v-if="hasAuth('manageUsers')"></menu-link>
<li class="pure-menu-item logout">
<a class="pure-menu-link" href="#" @click.prevent="logout">{{ $t('admin.logout') }}</a>
</li>
<menu-link route="/admin/uploads" :title="$t('admin.menu.uploads')"></menu-link>
<menu-link route="/admin/codes" :title="$t('admin.menu.codes')"></menu-link>
<menu-link route="/admin/users" :title="$t('admin.menu.users')" v-if="hasAuth('manageUsers')"></menu-link>
</ul>
</div>
</div>