Rbac (Ch7 Pg178) Allows Just One Role-User Association...

$auth->assign($this->role, $this->_user->id, $bizrule);

Can only by executed a single time for every role and user combination or you’ll get a database exception. That means that you cannot have the same role in more that one project.

Do I am missing something?

Thanks a lot for any comments.

The author’s solution was posted in: www.seesawlabs.com/yii-book/corrections

The real check is made in the tbl_project_user_assignment through the $bizrule, the tbl_auth_assignment checking is just so we can use Yii’s RBAC implementation.

Having the two tables makes the checking something like:

"Are you an owner? and if so, are you an owner of this specific project?"

The second question would suffice.

Maybe I’ll try to revise that implementation later.

Thanks for your time