Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #11943] 记录导入配置用户 #11945

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ public RestResult<Map<String, Object>> importAndPublishConfig(HttpServletRequest
RestResult<Map<String, Object>> errorResult;
if (metaDataZipItem != null && Constants.CONFIG_EXPORT_METADATA_NEW.equals(metaDataZipItem.getItemName())) {
// new export
errorResult = parseImportDataV2(unziped, configInfoList, unrecognizedList, namespace);
errorResult = parseImportDataV2(srcUser, unziped, configInfoList, unrecognizedList, namespace);
} else {
errorResult = parseImportData(unziped, configInfoList, unrecognizedList, namespace);
errorResult = parseImportData(srcUser, unziped, configInfoList, unrecognizedList, namespace);
}
if (errorResult != null) {
return errorResult;
Expand Down Expand Up @@ -682,7 +682,7 @@ public RestResult<Map<String, Object>> importAndPublishConfig(HttpServletRequest
* @param namespace import namespace.
* @return error result.
*/
private RestResult<Map<String, Object>> parseImportData(ZipUtils.UnZipResult unziped,
private RestResult<Map<String, Object>> parseImportData(String srcUser, ZipUtils.UnZipResult unziped,
List<ConfigAllInfo> configInfoList, List<Map<String, String>> unrecognizedList, String namespace) {
ZipUtils.ZipItem metaDataZipItem = unziped.getMetaDataItem();

Expand Down Expand Up @@ -735,6 +735,7 @@ private RestResult<Map<String, Object>> parseImportData(ZipUtils.UnZipResult unz
}
ci.setTenant(namespace);
ci.setEncryptedDataKey(pair.getFirst());
ci.setCreateUser(srcUser);
configInfoList.add(ci);
}
}
Expand All @@ -750,7 +751,7 @@ private RestResult<Map<String, Object>> parseImportData(ZipUtils.UnZipResult unz
* @param namespace import namespace.
* @return error result.
*/
private RestResult<Map<String, Object>> parseImportDataV2(ZipUtils.UnZipResult unziped,
private RestResult<Map<String, Object>> parseImportDataV2(String srcUser, ZipUtils.UnZipResult unziped,
List<ConfigAllInfo> configInfoList, List<Map<String, String>> unrecognizedList, String namespace) {
ZipUtils.ZipItem metaDataItem = unziped.getMetaDataItem();
String metaData = metaDataItem.getItemData();
Expand Down Expand Up @@ -826,6 +827,7 @@ private RestResult<Map<String, Object>> parseImportDataV2(ZipUtils.UnZipResult u
ci.setAppName(configExportItem.getAppName());
ci.setTenant(namespace);
ci.setEncryptedDataKey(pair.getFirst());
ci.setCreateUser(srcUser);
configInfoList.add(ci);
}
return null;
Expand Down
Loading