refactor: 权限组简化为2组(readonly/write) + Transfer穿梭框选择数据库
- access_type 从3值(readonly/datachange/ddl)简化为2值(readonly/write) - readonly=只读查看(关联只读/从库用于查询) write=写入变更(关联主库用于工单) - 前端InstanceGroupPage重写: 2权限类型卡片+自定义Transfer穿梭框组件 - Transfer组件: 左侧可选数据库→右侧已授权数据库, 搜索/勾选/箭头移动 - role_permissions.py更新: 2值权限映射, get_accessible_instances按access_type过滤 - 后端schema/模型校验更新为readonly|write正则 - 15个测试全部通过
This commit is contained in:
1 parent
8161bcf5b5
commit
4111e1eee8
6 files changed
+352
-316
No files matched your search
@@ -6,7 +6,7 @@ export interface InstanceGroup {
|
||||
description?: string;
|
||||
db_type: string;
|
||||
permissions?: string[];
|
||||
access_type?: 'readonly' | 'datachange' | 'ddl';
|
||||
access_type?: 'readonly' | 'write';
|
||||
allowed_databases?: string[];
|
||||
is_active: boolean;
|
||||
created_at?: string;
|
||||
|
||||
Reference in new issue
Block a user