add is_admin method
This commit is contained in:
1 parent
817e5aadae
commit
29aa457a2d
1 file changed
+3
@@ -51,6 +51,9 @@ class User(AbstractBaseUser):
|
||||
|
||||
objects = UserManager()
|
||||
|
||||
def is_admin(self):
|
||||
return self.admin_type == AdminType.ADMIN
|
||||
|
||||
def is_super_admin(self):
|
||||
return self.admin_type == AdminType.SUPER_ADMIN
|
||||
|
||||
|
||||
Reference in new issue
Block a user