This commit is contained in:
j3d1 2023-12-13 15:50:35 +01:00
parent b6ed492382
commit 2c09540a1b
3 changed files with 13 additions and 8 deletions

View file

@ -77,6 +77,11 @@
{{ link.title }} {{ link.title }}
</a> </a>
</li> </li>
<li class="nav-item">
<a class="nav-link text-nowrap" href="/logout" @click.prevent="logout()">
Logout
</a>
</li>
</ul> </ul>
</div> </div>
@ -104,7 +109,7 @@ export default {
}, },
methods: { methods: {
...mapActions(['changeEvent', 'changeView', 'searchEventItems']), ...mapActions(['changeEvent', 'changeView', 'searchEventItems']),
...mapMutations(['setLayout']), ...mapMutations(['setLayout', 'logout']),
navigateTo(link) { navigateTo(link) {
if (this.$router.currentRoute.path !== link) if (this.$router.currentRoute.path !== link)
this.$router.push(link); this.$router.push(link);

View file

@ -22,18 +22,18 @@ const routes = [
{path: '/login', name: 'login', component: Login, meta: {requiresAuth: false}}, {path: '/login', name: 'login', component: Login, meta: {requiresAuth: false}},
{path: '/register', name: 'register', component: Register, meta: {requiresAuth: false}}, {path: '/register', name: 'register', component: Register, meta: {requiresAuth: false}},
{path: '/howto', name: 'howto', component: HowTo, meta: {requiresAuth: true}}, {path: '/howto', name: 'howto', component: HowTo, meta: {requiresAuth: true}},
{path: '/:event/boxes', name: 'boxes', component: Boxes, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_container'}},
{path: '/:event/items', name: 'items', component: Items, meta: {path: '/:event/items', name: 'items', component: Items, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_item'}}, {requiresAuth: true, requiresPermission: 'inventory.view_item'}},
{path: '/:event/box/:uid', name: 'box', component: Boxes, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_container'}},
{path: '/:event/item/:uid', name: 'item', component: Items, meta: {path: '/:event/item/:uid', name: 'item', component: Items, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_item'}}, {requiresAuth: true, requiresPermission: 'inventory.view_item'}},
{path: '/:event/boxes', name: 'boxes', component: Boxes, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_container'}},
{path: '/:event/box/:uid', name: 'box', component: Boxes, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_container'}},
{path: '/:event/tickets', name: 'tickets', component: Tickets, meta: {path: '/:event/tickets', name: 'tickets', component: Tickets, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_issuethread'}}, {requiresAuth: true, requiresPermission: 'tickets.view_issuethread'}},
{path: '/:event/ticket/:id', name: 'ticket', component: Ticket, meta: {path: '/:event/ticket/:id', name: 'ticket', component: Ticket, meta:
{requiresAuth: true, requiresPermission: 'inventory.view_issuethread'}}, {requiresAuth: true, requiresPermission: 'tickets.view_issuethread'}},
{path: '/admin', name: 'admin', component: Admin, meta: {path: '/admin', name: 'admin', component: Admin, meta:
{requiresAuth: true, requiresPermission: 'inventory.delete_event'}}, {requiresAuth: true, requiresPermission: 'inventory.delete_event'}},
{path: '/admin/files', name: 'files', component: Files, meta: {path: '/admin/files', name: 'files', component: Files, meta:

View file

@ -7,7 +7,7 @@
<h3 class="text-center">User: {{user}}</h3> <h3 class="text-center">User: {{user}}</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
<p>Your Acoount is not yet activated. Please contact an admin.</p> <p>Your Account is not yet activated. Please contact an admin.</p>
</div> </div>
</div> </div>
</div> </div>