重构用户权限

This commit is contained in:
2025-09-25 18:41:23 +08:00
parent 8436a4602f
commit a6d76a64c4
7 changed files with 72 additions and 58 deletions

View File

@@ -51,6 +51,9 @@ class User(AbstractBaseUser):
objects = UserManager()
def is_regular_user(self):
return self.admin_type == AdminType.REGULAR_USER
def is_admin(self):
return self.admin_type == AdminType.ADMIN