How to assign roles to employees conveniently using GUI?

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.

I have created CRUD’S for all auth_item, auth_assignment, auth_rule, auth_item_child.

Admin is only going to assign roles to emplowyees. So should I create a menu Roles on side bar and link the auth_assignment CRUD to it? or what is convenient way for role assignment.

If I allow the admin to assign roles using auth_assignment CRUD, then he may get confused about which item_name is role and which is permission.

For, eg. item_name consist of admin, createEmp, createGroup, etc.

Here admin clearly states that it is role whereas createEmp and createGroup are permissions

So how to accomplish this?

As for me I would use x-editable widget in Employee GridView column.

item_name type can be fetched from table auth_item

In Controller you need revoke role and assign new one

For list of roles and permissions just create helper class

How to accomplish the task?

Can you give me details?

But while fetching, only admin, fieldofficer and pastor roles should be displayed and not createGroup, createEmp as these are permissions.