logan b80d383b28 refactor: 重构权限组系统 — 新增 access_type/allowed_databases 字段 + 角色权限服务
重构 InstanceGroup 权限组系统,从细粒度 20+ 权限开关简化为 3 种类型模式。

改动:
- InstanceGroup 模型新增 access_type (readonly/datachange/ddl) 和 allowed_databases 字段
- 保留旧 permissions 字段以兼容已有数据
- Schema 新增 access_type 和 allowed_databases 字段
- API endpoint 更新 create/update 处理逻辑
- 新增 role_permissions.py 服务,提供角色权限查询

Refactor InstanceGroup permission system from 20+ fine-grained permission
switches to a simplified 3-type access model (readonly/datachange/ddl).

Changes:
- Add access_type and allowed_databases columns to InstanceGroup model
- Keep legacy permissions field for backward compatibility
- Update schemas with new fields
- Update API endpoint create/update logic
- Add role_permissions.py service with role-based permission queries
2026-05-24 18:54:36 +08:00
S
Description
No description provided
3.2 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 72.5%
Go 23%
Shell 2.1%
Python 1.3%
CSS 0.5%
Other 0.6%