修复bug

This commit is contained in:
2026-08-03 20:50:18 +08:00
parent d2370650e7
commit fa922ca96f
13 changed files with 357 additions and 736 deletions
+4 -2
View File
@@ -37,11 +37,13 @@ describe('admin router access metadata', () => {
expect(route?.meta.permission).toBe('platform:download:list')
})
it('protects enterprise reviews with the backend review menu permission', () => {
it('redirects the removed enterprise review route to the protected customer list', () => {
const route = router.getRoutes().find((item) => item.name === 'enterprise-reviews')
expect(route?.path).toBe('/customers/reviews')
expect(route?.meta.permission).toBe('platform:customer:review')
expect(route?.redirect).toBe('/customers')
expect(route?.meta.permission).toBe('platform:customer:list')
expect(route?.meta.permissionAnyOf).toContain('platform:customer:review')
})
it('keeps forbidden inside the authenticated layout without a business permission', () => {