mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 00:13:18 +00:00
add is_admin method
This commit is contained in:
parent
817e5aadae
commit
29aa457a2d
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user