- 控制特殊数据不允许操作,只允许到数据库主键操作
"ruleDb": {
"sql": "select user_name name,user_id value from bo_user_account where user_id in @_filterUser and ({primary_where_sql})",
"where": " or user_id=@userId",
"field": "userId",
"value": null
},
{
//#region 操作前验证
"ruleDb": {
"sql": "select app_name name,app_id value from bo_app_config where ({primary_where_sql}) and (@_developer=1 or create_user_id=@_userId or create_user_id in @_mergeUserId or app_id in (select object_id from bo_app_config_user where (user_id=@_userId or user_id in @_mergeUserId) and user_type=2 and is_enabled=1))",
"where": " or app_id=@appId",
"field": "appId",
"showField": "appName",
//如果上面数据存在,表示有权限
"reverse": true,
"value": null,
"messageD": "无权限【{0}】,一定要删除,请联系管理员",
"messageI": "无权限【{0}】,一定要添加,请联系管理员",
"messageU": "无权限【{0}】,一定要修改,请联系管理员"
},
//#endregion 操作前验证
"rules": {}
}
- 后端实现源码刨析
文档更新时间: 2023-02-19 11:04 作者:admin