I want to create different ‘kinds’ of users. As per this article :
class User(AbstractUser):
DOCTOR = 1
NURSE = 2
SURGEN =3
ROLE_CHOICES = (
(DOCTOR, 'Doctor'),
(NURSE, 'Nurse'),
(SURGEN, 'Surgen'),
)
role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, blank=True, null=True)
But if I have 2 different kinds of users where each kind of user has different kinds of sub users ?
User
| - Sales
| - Admin
| - Sales Person
| - Sales Manager
| - Accounts
| - Delivery
| - Support
| - Operations
| - Super Admin
| - Admin
| - Management
| - CSR
Some users of Operations like SuperAdmin and Admin should be able to access a Sales > Sales User menu items.
Then what’s the best way to go about creating users and user roles ?