完善用户安全信息管理
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-08 11:53:47 +08:00
1 parent 3456b9d481
commit 31ee54942a
22 files changed
+1728 -5

No files matched your search

+22
View File
@@ -44,6 +44,28 @@ test('用户管理页面可编译并展示权限与安全状态列', () => {
assert.match(source, /scope\.row\.RecoveryCodeConfigured/)
assert.match(source, /scope\.row\.ExternalEmailEnabled/)
assert.match(source, /scope\.row\.ExternalEmailConfigured/)
assert.match(source, /管理安全码/)
assert.match(source, /编辑外部邮箱/)
assert.match(source, /RecoveryCodeDialog/)
assert.match(source, /UserExternalEmailDialog/)
})
test('用户安全信息使用独立弹窗并调用固定管理接口', () => {
for (const component of [
'RecoveryCodeDialog/RecoveryCodeDialog.vue',
'UserExternalEmailDialog/UserExternalEmailDialog.vue',
]) {
const { descriptor, errors } = parse(read(component))
assert.deepEqual(errors, [])
assert.doesNotThrow(() => compileScript(descriptor, { id: component, inlineTemplate: true }))
}
const recoverySource = read('RecoveryCodeDialog/RecoveryCodeDialog.js')
assert.match(recoverySource, /\/api\/v1\/user\/security\/recovery-codes\/generate/)
assert.match(recoverySource, /shown_once|codes/)
const externalSource = read('UserExternalEmailDialog/UserExternalEmailDialog.js')
assert.match(externalSource, /\/api\/v1\/user\/security\/external-email\/change/)
assert.match(externalSource, /\/api\/v1\/user\/security\/external-email\/verify/)
assert.doesNotMatch(externalSource, /\/api\/v1\/security\/external-email\/bind/)
})
test('用户管理样式可编译并保持紧凑表格布局', () => {