How to integrate different level of admins

I have the following options for a user in the database:

levelid=1 to 5 where 1=superadmin 2=admin 3=manager 4=editor 5=guest

I would like certain controllers and methods to be accessible by only some of the members.

How would I define these in Yii?

How can I make sure that superadmin has all the rights of admin, and admin has all the rights of manager?

How will I identify a user in what category does he belongs to?

How can I restrict a user’s access to content?

How can I check if I can show a link that he has permissions to access?


Read this topic Authentication and Authorization

you should see the rights or srbac extensions.

i think they will give you more convenience to do that.

Hello, for each of the levels u have create them as modules these will give u ease of upgrade and maintenance

while used this RIGHT EXTENSION for authentication and authorization

All of your questions can be answered by this part of Yii’s tutorial.

You also need to have a front-end for easier maintainance. You can download one from the extensions page and see the items under Auth category.