yueli
0b75740ae0
feat: 权限系统重构 — 操作权限双向展开 + 启动时自动补全默认权限
## permission_service.py
- init_all_menus: menu_defs 新增 inbound_purchase(采购申请) 菜单项
- init_all_menus: 创建 inbound_purchase:operation 操作元素
- 新增 ensure_default_permissions(): 启动时从 sys_user 提取活跃角色,
对空权限角色自动补全默认菜单(按角色类型分级)
- 自动迁移: 已有 inbound_buy 权限的角色 → 自动获得 inbound_purchase
- SUPERVISOR 启动时自动获得 inbound_purchase 菜单权限
## decorators.py
- _expand_operation_perms 改为双向桥接:
正向(inbound_buy:operation←inbound_buy:write)→通过
反向(inbound_buy←inbound_buy:operation)→通过(可编辑隐含可读)
- 新增详细诊断日志,记录展开路径和失败原因
## __init__.py
- 启动时调用 PermissionService.ensure_default_permissions()
2026-07-16 11:25:41 +08:00
..
2026-05-21 14:09:57 +08:00
2026-07-15 17:37:57 +08:00
2026-05-27 09:57:01 +08:00
2026-01-26 13:47:53 +08:00
2026-07-15 09:22:58 +08:00
2026-06-10 11:30:07 +08:00
2026-07-15 17:37:57 +08:00
2026-07-15 11:49:53 +08:00
2026-07-13 15:12:22 +08:00
2026-07-15 17:37:57 +08:00
2026-01-26 13:47:53 +08:00
2026-07-15 17:37:57 +08:00
2026-07-16 11:25:41 +08:00
2026-07-15 16:07:59 +08:00
2026-07-15 17:37:57 +08:00