-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
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
Further info required on using 2 x instances #338
Comments
In addition, is there a recommended way we can access $can for example from router?
|
Hello, Check this example - https://github.com/stalniy/casl-examples/tree/master/packages/vue-todo If the same user has access to both areas then I’d recommend to use single ability instance for the app. Anyway you have different entities in both areas (I guess). Thanks for the note about dead link. I’ll check and fix today a bit later. |
Use ability instance directly. You don’t need reactivity in the router. Check this comment as well https://medium.com/@sergiy.stotskiy/so-there-are-several-approaches-3ee962fb9fb5 update: alternatively define router lifecycle hook in component |
Yeah the same user cannot access either side. |
@wrabit read the docs on CASL's website. For vue - https://stalniy.github.io/casl/v4/en/package/casl-vue , all links there works as expected |
the links are fixed. Thanks for the issue. Close as there is nothing to from CASL side |
Thanks @Olena-Stotska, I never knew those docs existed! |
Hello, after some scouring I feel this plugin is almost what I need vs all the rest, but I am still missing some info in order to proceed.
My project has one entry, main.js but 2 areas ("dashboard" and "manager"), each with separate sets of permissions, so I don't want the various methods affecting permissions in both sides.
Where to go from here? What does
./services/ability
look like? It's not a plugin file? I cannot see any sample of it in the docs or Medium walkthrough.If this is where I will find out, this is a dead link.
The text was updated successfully, but these errors were encountered: