Skip to content

Casl/vue with Vue2 #478

Closed Answered by bakhti-uzb
bakhti-uzb asked this question in Q&A
Mar 10, 2021 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I was using @casl/[email protected] and @casl/[email protected]
As said in the comments by @stalniy on SO https://stackoverflow.com/q/66527075/8770647

If you get null for relevantRuleFor it means that casl doesn’t a rule for provided action/subject pair. From what I can tell is that the shape of rule object is wrong. actions was deprecated in v4 and removed in v5. Try to replace actions with action

After changing actions to action that worked.

Thanks @stalniy
Casl is a great library

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@bakhti-uzb
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by bakhti-uzb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants