|
|
4f5965db02
|
feat: JWT多租户数据权限隔离 & 主管系统管理权限 & 含税单价补齐
## 多租户公司数据隔离
- 新增 get_current_company_filter() 工具函数 (decorators.py)
SUPER_ADMIN: 可传company_name参数过滤或传ALL看全量
其他角色: 强制隔离到JWT中的company_name
- 重构 base_service.py / buy_service.py: 用集中式函数替换内联公司过滤
- SysRolePermission 表新增 company_name 字段,支持同角色不同公司权限
- get_user_permissions() 新增 company_name 参数,查公司定制+全局模板权限
- permission.py API 新增 @permission_required 拦截 + 公司过滤
- 19个API/service文件传递 company_name 到权限查询
## 主管系统管理权限
- delete_user() 允许SUPERVISOR删除同公司用户 (原仅SUPER_ADMIN)
- get_all_users() 新增 company_name 参数过滤
- 用户列表/权限分配 API 应用 get_current_company_filter()
- 前端 UserCreate.vue: 超管可见公司下拉框,主管隐藏部门字段
## 前端多租户适配
- material/list.vue / buy.vue: 公司下拉框仅超管可见,默认ALL
- UserCreate.vue: 新增搜索栏公司筛选,部门字段按角色显隐
- auth.ts: getUserList() 支持 params 参数
## Bug修复: 含税单价字段补齐
- buy.vue: 表格列/高级筛选/排序/权限映射新增 post_tax_unit_price
- buy_service.py: allowed_fields/sort_field_map 新增 post_tax_unit_price
|
2026-07-13 15:12:22 +08:00 |
|
|
|
3cb31c2b67
|
fix: 修复 JWT 幽灵令牌漏洞,新增 Dify 权限过滤服务
|
2026-05-18 16:16:50 +08:00 |
|
|
|
f8f5b05d7d
|
refactor(audit): 废弃装饰器+分离架构,改为监听器单体直写入库
|
2026-04-20 16:04:01 +08:00 |
|
|
|
7e72c12f30
|
fix(audit): 修复 decorators.py 中缺失 has_request_context 导入导致的致命 NameError
|
2026-04-20 15:10:12 +08:00 |
|
|
|
decb7f5e1f
|
debug(audit): 添加X光调试-追踪断点
|
2026-04-20 15:01:20 +08:00 |
|
|
|
1c8def7e6f
|
refactor(audit): 分离架构-监听器计算装饰器入库
|
2026-04-20 14:41:40 +08:00 |
|
|
|
381d1fa675
|
feat(audit): 平滑升级-监听器+装饰器共存,装饰器自动检测并跳过已处理日志
|
2026-04-20 13:15:25 +08:00 |
|
|
|
a52ced0375
|
fix(backend): resolve DetachedInstanceError in audit_log, add pessimistic locks for stock adjustments, and eliminate N+1 queries with eager loading
|
2026-04-02 18:44:12 +08:00 |
|
|
|
46dd8f1c3a
|
fix(auth,audit): ensure display_name persists in token refresh and add fallback in audit log
|
2026-03-25 11:16:13 +08:00 |
|
|
|
032479fe38
|
fix: capture and persist target object names for delete, outbound, and borrow operations in audit logs
|
2026-03-20 15:47:13 +08:00 |
|
|
|
4223a95f10
|
feat: generate permission sql for stocktake modules and implement single-device login restriction
|
2026-03-20 09:11:54 +08:00 |
|
|
|
ac97c6066b
|
feat: 升级审计装饰器,支持自动抓取并记录 API 请求体作为变更明细
|
2026-03-10 17:36:02 +08:00 |
|
|
|
be6575344a
|
feat: 新增企业级操作审计日志闭环模块(包含底层模型、记录装饰器与前端看板)
|
2026-03-10 12:15:26 +08:00 |
|
|
|
c1e4acc1d8
|
fix: standardize role case handling in permission logic
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 17:07:45 +08:00 |
|
|
|
a0993767fe
|
fix: make SUPER_ADMIN role checks case-insensitive across app
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 17:04:22 +08:00 |
|
|
|
11fafde5e3
|
fix: remove temporary role whitelist and add permission denial logging
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 10:29:15 +08:00 |
|
|
|
1f9a363545
|
chore: add debug logs and temp whitelist to permission decorator
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 10:27:44 +08:00 |
|
|
|
b3e1ac6245
|
feat: implement permission checking and field-level data masking
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 10:20:09 +08:00 |
|
|
|
73ee163352
|
feat: add MaterialBase permission control with field-level filtering
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
|
2026-02-27 10:16:43 +08:00 |
|
|
|
13590b1fac
|
超级管理员登录设置
|
2026-02-04 13:30:07 +08:00 |
|
|
|
ee9f4aed3e
|
修正git管理关系
|
2026-01-26 13:47:53 +08:00 |
|