0

I am using yii2 basic and have implemented RBAC using permissions, roles.

I have Employee table and I have assigned Employee model to user application component.

Now the scenario is when admin creates employee he has to assign a role to that employee using auth_assignment CRUD.

Unless and until role has been assigned, the employee should not be able to login. Login page should be displayed to him with error message. (Similar to the scenario when incorrect username or password is entered by user.)

How to accomplish this?

Questions
  • 69
  • 1
  • 12
  • Is Active Directory an option for you? – Jairus Sep 30 '17 at 15:03
  • What is Active Directory represents? – Questions Oct 03 '17 at 13:54
  • https://en.wikipedia.org/wiki/Active_Directory – Jairus Oct 03 '17 at 18:05
  • I would strongly recommend using active directory, ask your IT guys to hook you up with a service account so you can do single sign on (SSO) and then use the following two extensions: - "mdmsoft/yii2-admin": "~2.0" - "edvlerblog/yii2-adldap-module": "^3.0.0" The nice thing is you will never have to manage passwords. – Jairus Oct 03 '17 at 18:08
  • I also recommend you use the yii2-advanced template which already has a user-login foundation and associated models. – Jairus Oct 03 '17 at 18:11
  • https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-comparison.md – Jairus Oct 03 '17 at 18:12

0 Answers0