rbac with access control(pass param to can method)

hi there

by following this link(http://www.yiiframework.com/doc-2.0/guide-security-authorization.html) i set up authentication for the project

every thing is ok, but a question

in access control, i can check if a user can access actionIndex or not like this:

    public function behaviors()


        return [

            'access' => [

                'class' => AccessControl::className(),

                'only' => ['logout', 'signup', 'index'],

                'rules' => [


                        'actions' => ['index'],

                        'allow' => true,

                        'roles' => ['author'],






automatically this role, trigger can method

my question is how to pass $params to can method in this way, when i use access control to check my rbac hierarchy?

for example i want to check that can only update his own post!

thanks in advanced?