blob: 9a9915314762adfde28b6194ada8afe4c0a52fff (
plain) (
blame)
1
2
3
4
5
6
|
export default function({ store, redirect }) {
// If the user is not authenticated
if (!store.state.auth.user) return redirect('/login');
if (!store.state.auth.user.isAdmin) return redirect('/dashboard');
return true;
}
|