is it possible that run srbac on two use tables

Hi Spyros,

Recently, I am working on a project, and it use two tables for user authenticate, one is User table, another is Agency table. This is a site of student and agency, student can find train info from here, and The agency publish their course here.

Here is the question, the guy before me use two form for login, one is use another is agency, but I found srabc only can use on table for 'user', so I need your help.

Btw, The id of user and agency is not in the same format, user id like u_00001, agency id like a_00001.

The worse way is change DB put two table together and split difference into two table, and put the together table info srbac config.

anyway, thx.

It’s not possible to use two or more tables since srbac loads the user model to assign roles.

Two tables mean two models so that will be a problem

I’ll try to think of a way to solve this problem like having the two models extend a base user model (with only the id, username attributes) and use this base user model as the srbac user or something like that

the main reason for me to post this out is find a way to solve this ,and I thought that if make a base class for srbac and a default class extend from it, and make it like today’s srbac, and give user ability to make another extend class is awesome.

anyway thanks for you reply, and hoping hear good news from you.