Advertisement
linuxyamigos

Untitled

Mar 30th, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default function protegeRutas(context) {
  2.  
  3.     if (context.route.path.match(/^\/dashboard/) && context.store.state.auth.authUser.id == null) {
  4.         context.store.commit('auth/set_alert', 'Acceso no autorizado');
  5.         context.redirect('/login');
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement