I was recently introduced to Yii and I was amazed. All the generated code is amazing. I’ve been testing around a bit.
I’ve been creating a crud for “Users” model which contain username, password, salt and userlevel. I want to just give all with > userlevel than like 2 to have access to certain things.
If I understood correctly it is accessRules() method that control the access. How do I grab the userlevel and then compare to the current user logged in (or something like that) Do I only need to modify accessRules() in order to get this to working?
RBAC seem very cool. But I’m not really sure what I need to store in the database in order to keep track of what user role the logged in user have. Are there any more specific article about this?
Thanks! And sorry for posting in the wrong section, early in the morning, developing