Mercurial > gemma
diff client/src/router.js @ 853:fb39ec3b95a8
systemconfig WIP
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 28 Sep 2018 13:55:44 +0200 |
parents | badbc0207418 |
children | ca628dce90dd |
line wrap: on
line diff
--- a/client/src/router.js Fri Sep 28 13:45:04 2018 +0200 +++ b/client/src/router.js Fri Sep 28 13:55:44 2018 +0200 @@ -11,6 +11,8 @@ const Main = () => import("./application/Main.vue"); const Usermanagement = () => import("./usermanagement/Usermanagement.vue"); const Logs = () => import("./logs/logs.vue"); +const Systemconfiguration = () => + import("./systemconfiguration/systemconfiguration.vue"); Vue.use(Router); @@ -54,6 +56,22 @@ } }, { + path: "/systemconfiguration", + name: "systemconfiguration", + component: Systemconfiguration, + meta: { + requiresAuth: true + }, + beforeEnter: (to, from, next) => { + const isSysadmin = store.getters["user/isSysAdmin"]; + if (!isSysadmin) { + next("/"); + } else { + next(); + } + } + }, + { path: "/", name: "mainview", component: Main,