Hi All…
I have a User Table, Authorization Table and a Roles Table. In the roles table there are two fields : Role Id and Role Name . The table Authoror ex:ization has role id and user id . One user can have more than one roles specified in the role table. Now I want that the user should be able to add only those users which have less priviledge then him. For ex: If I have a user called superadmin then he will be able to add a user with a role admin but admin will not be able to add superadmin. I have successfully created this.
I have created a User Crud with Gii and successfully modified the create user code to achieve my desired functionality. Now I want this same thing to be reflected in the manage users page. I want the user should be able to view and manage only the users that have roles lesser to him. I was trying to toy with admin code in the CRUD controller but it is just sending the User object to the admin’s page .Is there any way to accomplish this thing???
Any help is appreciated
Regards