Im trying to handle a use case where i have 2 roles. (admin , customer)

There will be an admin portal and a customer portal (2 different login 
pages ).

   - An admin can invite a customer
   - An admin can be a customer as well , can invite himself into the 
   customer portal
   - An admin account must not share the same password as the customer 
   account.
   - Email is used as the unique field for both admin and customer account.

For example :

Admin account - custo...@email.com /password1 
Customer account - custo...@email.com /password2

Solution 1: - Permission. Having 1 account with admin permission and 
customer permission. (This cant work to fit the business use case)

Based on this article: 
https://simpleisbetterthancomplex.com/tutorial/2018/01/18/how-to-implement-multiple-user-types-with-django.html

Solution 2: - Creating 2 django projects. One for each user model since 
both accounts cant share password. The reason for separating into 2 
projects is because resources such as session,login, logout will not be 
shared. So each portal(admin,customer) has their own resource.

   - 
   
   A create Customer API to allow admin to create a customer account in 
   customer django project.
   - 
   
   A shared db to share related data
   
This is the only way i can think of to handle the use case. Please let me 
know if anyone has a better idea to handle this.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/181ec499-e36c-4009-9587-06386219ab8d%40googlegroups.com.

Reply via email to