Separate table for admins and users

I know this is mostly done via roles (user, admin, superadmin, …) but I would like to know if it is possible to have basically two completely separated authorizations using info from different tables (admins table and users table).

Or my only option is to create two separate apps using the same database?

Is something like that possible in Django. Have you ever done it? Are there any tutorials or at least docs or some tips how to setup such project?

Is there something like Laravel Multiauth for Django?

Is it possible? Sure. The question just becomes what parts of Django you need to replace or augment to accomplish it.

First, let’s clear up a little terminology. Technically, “authentication” and “authorization” are two different processes. An Authentication processes identifies that the person logging on is the person they claim to be. An Authorization processes identifies what actions a person can perform.

However, strictly speaking, neither of these processes are dependent upon the Django User model itself. The availability of external authentication tools such as CAS demonstrate that authentication can occur without access to the Django User model. And the built-in permission system is based upon association with permissions - tests that can be performed accessing any desired data.

So the real question lies in the “Why”? What problem or issue do you think you can resolve by doing this? Because on the surface, this looks a lot to me like an XY Problem. (No, I don’t know anything at all about Laravel - comparisons with it are not going to help me understand what you’re trying to achieve.)

1 Like

I went with Laravel. The Django community seems to be very inactive when compared to Laravel. Have a nice day.