Question about rbac system

Hi, I’m newb in PHP framework’s, and this is the first framework i used, for the moment my experience is good, but i have a question for the rbac system. My question is the next:

With this system can i control if a user rol ‘collaborator’ can see/edit a field of a form?

Thanks and regards,

[b]

s0mk3t[/b].

no answers?

Your question was a bit vague, but: yes, you can. :)

I haven’t used ‘raw’ role based code so I can’t really (off the cuff) tell what code to use - I am using Rights extension, which makes that really easy.

Maybe I’ll get back to you, if no-one beats me to it.

It’s just a matter of:


<?php if(Yii::app()->user->hasRights('what_rights') : ?>

show the field

<?php endif; ?>

Thanks for this info =), i’m reading the book, but i’m spanish and don’t understand much…=(

You can also take a look at this wiki, which describes very well the RBAC structure.

http://www.yiiframework.com/wiki/136/getting-to-understand-hierarchical-rbac-scheme