fix: 收口管理端页面权限与工作流运行授权
- 页面选项接口改用所属页面权限并返回最小数据视图 - 统一校验工作流引用、租户、状态与定时任务执行主体 - 补充聊天记录权限迁移和权限隔离回归测试
This commit is contained in:
@@ -76,17 +76,12 @@ function dedupeManagedDatasetOptions(options: ManagedDatasetOption[]) {
|
||||
export async function loadManagedDatasetOptions(): Promise<
|
||||
ManagedDatasetOption[]
|
||||
> {
|
||||
const sourceRes = await api.get('/api/v1/datacenterSource/page', {
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 200,
|
||||
},
|
||||
});
|
||||
const sources = sourceRes.data?.records || [];
|
||||
const sourceRes = await api.get('/api/v1/workflow/designer/dataSources');
|
||||
const sources = sourceRes.data || [];
|
||||
const options: ManagedDatasetOption[] = [];
|
||||
for (const source of sources) {
|
||||
try {
|
||||
const catalogRes = await api.get('/api/v1/datacenterSource/catalogs', {
|
||||
const catalogRes = await api.get('/api/v1/workflow/designer/catalogs', {
|
||||
params: {
|
||||
sourceId: source.id,
|
||||
},
|
||||
@@ -94,7 +89,7 @@ export async function loadManagedDatasetOptions(): Promise<
|
||||
const catalogs = catalogRes.data || [];
|
||||
for (const catalog of catalogs) {
|
||||
const tableRes = await api.get(
|
||||
'/api/v1/datacenterDataset/managedTables',
|
||||
'/api/v1/workflow/designer/managedTables',
|
||||
{
|
||||
params: {
|
||||
sourceId: source.id,
|
||||
@@ -176,7 +171,7 @@ export async function loadManagedDatasetSchema(
|
||||
fields: [],
|
||||
};
|
||||
}
|
||||
const res = await api.get('/api/v1/datacenterDataset/schema', {
|
||||
const res = await api.get('/api/v1/workflow/designer/schema', {
|
||||
params: datasetRef,
|
||||
});
|
||||
const data = res.data || {};
|
||||
@@ -188,8 +183,8 @@ export async function loadManagedDatasetSchema(
|
||||
}))
|
||||
: [];
|
||||
return {
|
||||
tableName: data.table?.tableName || datasetRef.tableName,
|
||||
tableDesc: data.table?.tableDesc,
|
||||
tableName: data.tableName || datasetRef.tableName,
|
||||
tableDesc: data.tableDesc,
|
||||
fields,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user