修复bug,添加备案号悬挂功能
This commit is contained in:
@@ -82,6 +82,15 @@ class PermissionChecker:
|
||||
role = await PermissionChecker.get_user_role(user_id)
|
||||
return role in ["班主任", "学习委员"]
|
||||
|
||||
@staticmethod
|
||||
async def get_user_class_id(user_id: int) -> Optional[int]:
|
||||
"""
|
||||
获取用户关联的班级ID
|
||||
单班级系统,固定返回1
|
||||
"""
|
||||
# 本系统为单班级设计,class_id 固定为 1
|
||||
return 1
|
||||
|
||||
@staticmethod
|
||||
async def check_can_revoke(user_id: int, record_id: int) -> bool:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user