I created a custom user using AbstractUser with 3 user types
USER_TYPE = (
("type1", "type1"),
("type2", "type2"),
("type3", "type3"),
)
class User(AbstractUser):
user_type = models.CharField(max_length=50, choices=USER_TYPE, null=True, blank=True, default="")
and each user have a dashboard its only visible to the corresponding user, but my case I can access all dashboard if any user is logged in so how to restrict the access based on this user types (type1, type2, type3 ) I am using class-based views