회사별 테이블 데이터 격리
This commit is contained in:
@@ -89,12 +89,20 @@ export const entityJoinApi = {
|
||||
});
|
||||
}
|
||||
|
||||
// 🔒 멀티테넌시: company_code 자동 필터링 활성화
|
||||
const autoFilter = {
|
||||
enabled: true,
|
||||
filterColumn: "company_code",
|
||||
userField: "companyCode",
|
||||
};
|
||||
|
||||
const response = await apiClient.get(`/table-management/tables/${tableName}/data-with-joins`, {
|
||||
params: {
|
||||
...params,
|
||||
search: params.search ? JSON.stringify(params.search) : undefined,
|
||||
additionalJoinColumns: params.additionalJoinColumns ? JSON.stringify(params.additionalJoinColumns) : undefined,
|
||||
screenEntityConfigs: params.screenEntityConfigs ? JSON.stringify(params.screenEntityConfigs) : undefined, // 🎯 화면별 엔티티 설정
|
||||
autoFilter: JSON.stringify(autoFilter), // 🔒 멀티테넌시 필터링
|
||||
},
|
||||
});
|
||||
return response.data.data;
|
||||
|
||||
@@ -280,7 +280,17 @@ export const tableTypeApi = {
|
||||
size: number;
|
||||
totalPages: number;
|
||||
}> => {
|
||||
const response = await apiClient.post(`/table-management/tables/${tableName}/data`, params);
|
||||
// 🔒 멀티테넌시: company_code 자동 필터링 활성화
|
||||
const requestBody = {
|
||||
...params,
|
||||
autoFilter: {
|
||||
enabled: true,
|
||||
filterColumn: "company_code",
|
||||
userField: "companyCode",
|
||||
},
|
||||
};
|
||||
|
||||
const response = await apiClient.post(`/table-management/tables/${tableName}/data`, requestBody);
|
||||
const raw = response.data?.data || response.data;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user