Role based access clarification needed


Can somebody post an example with explanation for RBAC.

i got the following line from here (

$bizRule=‘return Yii::app()->user->id==$params[“post”]->authID;’;

Can somebody please explain the meaning of this line ?



$bizRule is your business rule which tells Yii if this business rule is true than allow access[or whatever] if it is false deny access. In this case if Yii::app()->user->id==$params["post"]->authID [Yii::app()->user->id equals to $params["post"]->authID] return true…therefore allow the user to do something that is associated with the above bizRule. Thats how much I can help given the length of code you have provided

hope this helps


It confused me too, so I clarified the RBAC with a ‘top-down’ explanation here:

Just to answer your question: this bizRule checks that the ‘current user id’ equals the author id of the post.

yeah, the top down approach was great.

what i was not clear is this statement


what is this exactly ? with respect to what …

what exactly is $params["post"] ?