ability getter not working
Closed this issue · 3 comments
This line up here seems not working or I might be expecting something wrong. This supposed to update what? this is right after createSession
is committed? seems that the ability
var here is native only to that instance of the code. and I am not seeing results when I check $vm0.$ability
in the console or even from vue dev tool.
I for now export ability
var and assign it to the abilitiesPlugin
like what you did here https://medium.com/dailyjs/casl-and-cancan-permissions-sharing-between-ui-and-api-5f1fa8b4bec. So it seems conflicting on your medium article and the actual code in the repo
Hello,
The code was a bit changed from is in the article in order to support use cases for my JSFest presentation. In the linked article ability
var is imported from the module but now it's defined in the Vuex store getter here -
casl-vue-api-example/src/store/index.js
Line 40 in b479391
The code from the article can be found here - https://github.com/stalniy/casl-vue-api-example/tree/48209023c88b42fd1b92aebf206743ee2fa6b8e3