fix permissions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Lukas Bachschwell 2020-01-03 20:18:41 +01:00
parent 397b537b63
commit 3dd7aea121
Signed by: lbsadmin
GPG Key ID: CCC6AA87CC8DF425
2 changed files with 2 additions and 14 deletions

View File

@ -200,19 +200,12 @@ export const asyncRoutes = [
{
path: '/getincentives',
component: Layout,
redirect: '/example/list',
name: 'Example Articles',
meta: {
title: 'Belohnungen',
icon: 'present',
roles: ['editor']
},
children: [
{
path: 'my',
component: () => import('@/views/incentives/list'),
name: 'Belohnungen',
meta: { title: 'Belohnungen', icon: 'star', roles: ['editor'] }
meta: { roles: ['editor'], title: 'Belohnungen', icon: 'star' }
}
]
},

View File

@ -49,12 +49,7 @@ const mutations = {
const actions = {
generateRoutes({ commit }, roles) {
return new Promise(resolve => {
let accessedRoutes
if (roles.includes('admin')) {
accessedRoutes = asyncRoutes || []
} else {
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
}
const accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
commit('SET_ROUTES', accessedRoutes)
resolve(accessedRoutes)
})