One of my project needed roles. Needed permissions and authorizations were not complex enough to require additional plugins or extensions, I only wanted to deal with Yii. So, let's see how I did, one may find useful insights too for his/her case.
Needed authorizations
My application has three roles, each with following permissions: - User : a user can create a new post and edit it afterwards; a user can see other people posts, but he/her has no access to those - Editor : an editor, beside what's allowed for a user, can edit other people posts but cannot edit any admin's posts - Admin : well, admins are gods, so they can edit whatever they need