后台调整为只有管理员可以登录

This commit is contained in:
kingmo888 2023-12-14 09:01:48 +08:00
parent f4602248e0
commit 1b2f45dee9

View File

@ -75,8 +75,8 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
def is_staff(self):
"Is the user a member of staff?"
# Simplest possible answer: All admins are staff
#return self.is_admin
return self.is_active
return self.is_admin
#return self.is_active
class Meta:
verbose_name = "用户"