add new statistic page
This commit is contained in:
@@ -40,6 +40,7 @@ export default defineRouter(function (/* { store, ssrContext } */) {
|
||||
|
||||
Router.beforeEach((to, from, next) => {
|
||||
const userStore = useUserStore();
|
||||
|
||||
const isLoggedIn = userStore.isAuthenticated;
|
||||
if (!userStore.$state.firstLogin && to.path === '/firstlogin') {
|
||||
next('/login');
|
||||
@@ -51,7 +52,11 @@ export default defineRouter(function (/* { store, ssrContext } */) {
|
||||
to.meta.requiresAdmin &&
|
||||
!userStore.isPermittedTo(to.path.replace('/', ''), 'read')
|
||||
) {
|
||||
next('/');
|
||||
if (to.meta.noBackendAdmin) {
|
||||
next();
|
||||
} else {
|
||||
next('/');
|
||||
}
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user