Yii 2.0: Yii2's RBAC with three roles (admin, editor, author)

2 followers

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

Be the first person to leave a comment

Please to leave your comment.

Write new article
  • Written by: rashmani
  • Category: How-tos
  • Yii Version: 2.0
  • Votes: -1
  • Viewed: 4,126 times
  • Created on: Dec 13, 2016
  • Last updated: never