Hi everyone
Is there a way to combine scope and RBAC ?
I want to make a dynamic scope to returns Model records according to permissions of current user
for example
I could write a query to get the RBAC authitem inheritance and bizrule to fetch what records are permitted (view, read, create) for the user, but is complicated.
Is there a way to get compatible query with scope by Yii::app()->user->checkAccess('theAction',$bizRule) ?
Thanks
Is there a way to combine scope and RBAC ?
I want to make a dynamic scope to returns Model records according to permissions of current user
for example
public function scopes() {
return array(
'UserScope' => array(
'condition' => <something to get the records according to RBAC permissions>
),
);
}
I could write a query to get the RBAC authitem inheritance and bizrule to fetch what records are permitted (view, read, create) for the user, but is complicated.
Is there a way to get compatible query with scope by Yii::app()->user->checkAccess('theAction',$bizRule) ?
Thanks