Few fixes

This commit is contained in:
Antoine Nguyen
2024-06-22 19:44:51 +02:00
committed by Spitfireap
parent ff708b7faf
commit a9f59c98ee
2 changed files with 8 additions and 10 deletions
+7 -9
View File
@@ -294,18 +294,16 @@ router.beforeEach((to, from, next) => {
const authStore = useAuthStore()
authStore.initialize().then(() => {
authStore.validateAccess()
if (to.meta.requiresMailbox && !authStore.authUser.mailbox) {
next(false)
} else {
/*
if (to.meta.allowedRoles !== undefined) {
if (to.meta.allowedRoles !== undefined) {
if (to.meta.allowedRoles.indexOf(authStore.authUser.role) === -1) {
next({ name: 'Dashboard' })
return
next({ name: 'Dashboard' })
return
}
}*/
next()
}
if (to.meta.requiresMailbox && !authStore.authUser.mailbox) {
next({ name: 'Dashboard' })
}
next()
})
} else {
next()
+1 -1
View File
@@ -51,4 +51,4 @@ rq>=1.13.0
django-rq
# Sieve
sievelib>=1.3.0
sievelib>=1.4