b97dfaa95d6e167746ecddcd83afa1a365352cd8
Bug: if current_user: 在 Python 中 None/空dict均为falsy,
一旦 current_user 为空则整个权限块被跳过直接放行。
修复:
1. if not current_user → 直接 raise 401
2. 反转 SUPER_ADMIN 判断: if user_role != 'SUPER_ADMIN' 进入校验
(避免 if/else/pass 空分支带来的逻辑歧义)
3. main_task is not None 显式判断 (替代隐式 truthy)
Description
IRIS生成管理APP
Languages
Python
36.2%
TypeScript
33.8%
Vue
27.5%
JavaScript
1.3%
CSS
0.3%
Other
0.9%