-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Problem with vue-router #8
Comments
Thanks for raising this issue. Please see the globals section for how to create rules without subject. The way you are doing it isn't the intended usage. You are right that there is an issue with route handling. I'll look into it tomorrow. Again, you shouldn't use
I'll probably implement it so that you can use just You should consider splitting up your rules by subject. They can be just strings. So you could have:
It is much easier to read. |
Thank you for your quick replay |
I've published a new version (0.8.0) with a fix for this. It also adds a new feature to set the |
When using vue-router, I'm getting a trouble with
vue-browser-acl
.Step to reproduce:
I use empty object (
{}
) since I don't need any model to deal with, and everything is ok when usingv-can
directive or$can
helper like thisv-if="$can('administrate', {})"
orv-can:administrate="{}"
But when I use the
meta
object of route using empty object{}
the check fail alwaysThat never works , always fail
So I checked the repo code and found that the problème with this comes from that line
vue-browser-acl/index.js
Line 70 in 36f188e
Cause subject in my case will be a string not and Object, when I do JSON parse on subject, everything is okay then .
The text was updated successfully, but these errors were encountered: