Conversation
| } | ||
| validating.value = true | ||
| try { | ||
| preview.value = await validateSsoUserImport( |
There was a problem hiding this comment.
[P1] 这里在请求返回前直接写入 preview,但校验期间模式仍可在第 175 行切换。比如以 SKIP 发起校验后改为 UPDATE,旧的 SKIP 预览会重新启用确认按钮,而第 92 行会以 UPDATE 执行批量写入,预览与实际操作不一致。请把 preview 与 file、mode 及请求序号绑定,或在校验期间禁用这些变更。
There was a problem hiding this comment.
补充一个更顺手的实现方式:选中文件或切换 SKIP/UPDATE 时就自动启动校验,把主操作的状态收敛为“正在校验… / 确认导入 / 正在导入…”。仍需用 file + mode + requestId 丢弃过期响应;取消网络请求只是优化,不能代替这层保护。
|
|
||
| <template #footer> | ||
| <span class="dialog-footer"> | ||
| <el-button @click="visible = false"> |
There was a problem hiding this comment.
[P2] 实际导入开始后,取消按钮仍可关闭对话框,但不会中止第 92 行已发出的请求。选择 UPDATE 后立即关闭会让用户以为已取消,服务端仍继续批量写入;导入期间请禁用关闭和取消,或实现可中止请求并忽略关闭后的回调。
| } | ||
| Object.keys(mapping).forEach((key) => { | ||
| const item = this.findSamlItem(key) | ||
| if (item && mapping[key] != null) { |
There was a problem hiding this comment.
[P2] idpSloUrl 的类型允许为 null,但这里会跳过 null,导致导入一个不提供 SLO 的新 IdP 时保留旧 IdP 的 SLO 地址。随后保存会把新的实体、SSO 地址和证书与旧 SLO 混在一起,退出将发往错误地址;缺失的 SLO 应显式清空。
| importing.value = true | ||
| try { | ||
| const result = await confirmSsoUserImport(currentFile.value, importMode.value) | ||
| ElMessage.success( |
There was a problem hiding this comment.
[P2] 导入 API 的结果模型包含 failedCount 和逐行状态,但这里无论是否有失败都显示 success 并关闭弹窗。部分导入失败时用户无法查看最终失败行及原因;failedCount 大于 0 时请保留结果明细,并改为部分失败提示。
-SSO User Import: -Automatically verify after selecting files or switching modes. -Discard expired verification results using file+mode+requestId. -Disable closing, canceling, deleting files, and mode switching during import. -When there is a partial failure, keep the line by line results and display a "partial failure" prompt. -SAML metadata import: idpSloURL: null will explicitly clear old values. -Added import status in both Chinese and English, as well as some failure prompts.
No description provided.