Adicione primeiros dados da tabela
This commit is contained in:
@@ -73,35 +73,37 @@ const hasPermission = (requiredPermissions = []) => {
|
||||
);
|
||||
};
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title;
|
||||
}
|
||||
// router.beforeEach((to, from, next) => {
|
||||
// if (to.meta.title) {
|
||||
// document.title = to.meta.title;
|
||||
// }
|
||||
|
||||
// if (to.matched.some((record) => record.meta.requiresAuth)) {
|
||||
if (!isAuthenticated()) {
|
||||
next({
|
||||
path: "/login",
|
||||
query: { redirect: to.fullPath },
|
||||
});
|
||||
// console.log(to, from);
|
||||
|
||||
return;
|
||||
}
|
||||
// // if (to.matched.some((record) => record.meta.requiresAuth)) {
|
||||
// if (!isAuthenticated()) {
|
||||
// next({
|
||||
// path: "/login",
|
||||
// });
|
||||
|
||||
// const requiredPermissions = to.meta.permissions || [];
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if (requiredPermissions.length > 0 && !hasPermission(requiredPermissions)) {
|
||||
// next({ path: "/unauthorized" });
|
||||
// // const requiredPermissions = to.meta.permissions || [];
|
||||
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// // if (requiredPermissions.length > 0 && !hasPermission(requiredPermissions)) {
|
||||
// // next({ path: "/unauthorized" });
|
||||
|
||||
// if (to.matched.some((record) => record.meta.guest) && isAuthenticated()) {
|
||||
// next({ path: "/" });
|
||||
// // return;
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// return;
|
||||
// }
|
||||
// // if (to.matched.some((record) => record.meta.guest) && isAuthenticated()) {
|
||||
// // next({ path: "/" });
|
||||
|
||||
next();
|
||||
});
|
||||
// // return;
|
||||
// // }
|
||||
|
||||
// next();
|
||||
// return;
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user