victorybiz / vue-simple-acl

A simple unopinionated Vue plugin for managing user roles and permissions, access-control list (ACL) and role-based access control (RBAC).
https://github.com/victorybiz/vue-simple-acl
130 stars 23 forks source link

can not send parameter in script #19

Open morteza-mortezai opened 1 year ago

morteza-mortezai commented 1 year ago

Hi

I am using with Vuejs3 setup

when I wanna use like this in component

acl.permission('update-post',post_id)

it doesn't work properly

acl.js

setRule('update-post', (user,post_id) =>{ console.log('post_id',post_id); return true })

and in console I get :

_postid undedfined

doornema commented 9 months ago

hello use this style acl.can("update-post", [post_id])) or acl.permission("update-post", [post_id])) its worked for me