Yii Framework Forum: Dektrium User and RBAC: managing users with frontend and backend users stored in separate tables - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Dektrium User and RBAC: managing users with frontend and backend users stored in separate tables Using the dektrium yii2-user to manage users stored in separate tables Rate Topic: -----

#1 User is offline   toMeloos 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 50
  • Joined: 19-September 09

Posted 20 August 2016 - 06:23 AM

Hi,

I'm building a site with a Frontend and a Backend app (using the advanced template) and using Dektrium's user and rbac modules. For this specific project I need strict database separation between customers in the Frontend and admins in the Backend, which I've achieved by:
  • creating two sets of user and rbac tables using a custom migration;
  • overriding the user module models in both Frontend and Backend with tableName() functions pointing at their separate tables; and
  • modifying the config/main.php configurations to set authManager *Table variables and the user module modelMap variable.

This works perfectly. I have fully separated Frontend and Backend users, each with their own rbac set. So far so good. I can also use the user module adminController in the Backend to manage my Backend users.

I also need to manage my Frontend users from the Backend. Can I somehow override the models/controllers to point (a second instance of the adminController of) the module to my Frontend user and rbac tables for this?

Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users