admin_user table + user table #326
-
We're upgrading an old service related to our main application. This older service is sort of a blank slate, but we initially started it on devise, but realized it wasn't going to serve our needs. In devise we had admin_users and users, separate tables each responsible for logging in their respective user (admin or user). I had thought about making the additional tables that are generated alongside user in rodauth polymorphic being that they could either be an admin or a user, but I don't want to create issues if that's not feasible. I'm wondering if there's a way to do this. I see the multiple configs in the readme, but I'm wondering if I need to generate another 4 tables for admin or if I can change the existing to be polymorphic. EDIT: I did find this. I think our scenario separate tables is probably going to be the play.. https://github.com/janko/rodauth-rails/wiki/Account-Types |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It would probably require a lot of work to get Rodauth to support polymorphism here. So, if you want separate account tables, then you'll need separate tables for all other features as well. Or, as the wiki page shows, you can have a type column on the accounts table. |
Beta Was this translation helpful? Give feedback.
It would probably require a lot of work to get Rodauth to support polymorphism here. So, if you want separate account tables, then you'll need separate tables for all other features as well. Or, as the wiki page shows, you can have a type column on the accounts table.