\"fix: auto enable warning sort based on permission when no manual sort specified\"
This commit is contained in:
@ -131,6 +131,12 @@ def get_list():
|
||||
}
|
||||
|
||||
user_permissions = get_current_user_permissions()
|
||||
|
||||
# 自动拦截:如果用户有预警查看权限,且当前没有按特定列手动排序,则强制开启预警智能排序
|
||||
has_warning_perm = 'material_list:view_warning' in user_permissions
|
||||
if has_warning_perm and not filters.get('orderByColumn'):
|
||||
filters['enableWarningSort'] = True
|
||||
|
||||
result = MaterialBaseService.get_list(page, limit, filters, user_permissions)
|
||||
# 字段级脱敏
|
||||
user_permissions = get_current_user_permissions()
|
||||
|
||||
Reference in New Issue
Block a user