Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Model Scopes And Rbac

$
0
0
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

 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

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>