I am using Yii 2 basic application template. I have a employee table with username and password field. RBAC is also implemented very well along with user application component for authentication. Now there is a requirement of creating different tables such as pastor, teacher, admin. There are certain fields different from that in employee table so we need to create additional extra tables.
Now how to implement user Authentication (user application component with identity classes) for multiple tables (employee, pastor, teacher, admin) using same login form.
And can we implement RBAC if there are many such tables, because in RBAC there is auth_assignment table where user_id field is assigned to be employee table’s empid as foreign key. Now there are three more tables.
So in RBAC, for auth_assignment, do we need to specify employee, pastors, teacher and admin table’s primary key as foreign key.?
How to implement this in detail?