I am using Yii2 basic.
I have Employee table and I have assigned Employee model to user application component as follows in config file:
'user' => [
'identityClass' => 'app\models\Employee',
'enableSession' => true,
],
I have also created permissions, roles and assigned roles to employees using RBAC.
1. Now when employee whose role is admin logs in, he can see foll menus on sidebar of Admin LTE:
- Masters
- Employee
- Employee Training
- SHGProfile
- Survey
When employee whose role is fieldofficer logs in, he also sees above menus on sidebar. Fieldofficer should only see foll menus:
- My Profile
- SHGProfile
How to change the menus on sidebar of Admin LTE as per roles of the employees?
2. Employee should be able to log in to the system only if role is assigned to employee. How to accomplish this?