We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it planned an integration with vue-router ? Could we authorize route depend of roles and/or permissions with meta field
The text was updated successfully, but these errors were encountered:
Currently to integrate with Vue Router I'm putting the check in the beforeEnter callback
beforeEnter
{ path: '/surveys/:survey_id/edit', component: SurveyForm, beforeEnter: (to, from, next) => { if (!router.app.$gates.hasAnyRole('Admin|Super Admin') || !!router.app.$store.state.surveys.find(s => s.id === parseInt(to.params.survey_id)) { next('/surveys'); } next(); } },
It would be really nice to just pass meta: { middlewares: ['admin', 'owner'] } and if route params were available in the middleware
meta: { middlewares: ['admin', 'owner'] }
Sorry, something went wrong.
williamcruzme
No branches or pull requests
Is it planned an integration with vue-router ?
Could we authorize route depend of roles and/or permissions with meta field
The text was updated successfully, but these errors were encountered: