unbridled-41 commented on PR #4899:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4899#issuecomment-5775347927

   ### Verification pass — clean checkout of `15d000cb`
   
   Re-verified from a fresh `git worktree add --detach 
fork/fix/acl-risk-multi-action-perm`
   (own checkout, own build output; only `web/node_modules` symlinked), so 
nothing here is re-stated
   from my working tree.
   
   **Citations** — every `file:line` in the description re-read with `grep 
-n`/`sed -n` there:
   
   | Citation | Checked |
   |----------|---------|
   | `web/src/pages/instance/acl.tsx:1515-1529` | the actions `Form.Item` with 
the PUB/SUB/ALL `Checkbox.Group` (option values at `:1524-1526`) — a 
multi-action rule is what the editor produces |
   | `web/src/pages/instance/acl.tsx:965` | `analyzeAclRisk(clusterConfig)` |
   | `MybatisPlusAclRepository.java:366` / `:368` | 
`joinNormalizedCsv(rule.getActions())` then `topicPerms.add(rule.getResource() 
+ "=" + actions)` |
   | `MybatisPlusAclRepository.java:191-204` | `examineBrokerClusterAclConfig`, 
the producer of what the page analyses |
   | base `aclRiskDiagnostics.ts:101-112`, `:91-97`, `:197-199`, `:294`, `:307` 
| the quoted pre-fix code of `normalizePermission`, `PERMISSION_ALLOW_RANK` 
(`UNKNOWN: 0`), `hasDefaultAllow` and both wildcard severities |
   
   **Tests re-executed in the clean worktree**
   
   ```
   $ npx vitest run src/utils/aclRiskDiagnostics.test.ts
    Test Files  1 passed (1)
         Tests  7 passed (7)
   
   $ npx vitest run src/utils src/pages/instance/__tests__/AclPage.test.tsx
    Test Files  21 passed (21)
         Tests  156 passed (156)
   
   $ npx tsc -b && npx eslint src/utils/aclRiskDiagnostics.ts 
src/utils/aclRiskDiagnostics.test.ts
   (no output, exit 0)
   ```
   
   **Pre-fix behaviour re-demonstrated** — new test kept, only 
`web/src/utils/aclRiskDiagnostics.ts`
   restored to `origin/rocketmq-studio`:
   
   ```
    FAIL  src/utils/aclRiskDiagnostics.test.ts > ACL risk diagnostics > reads 
the comma-joined action list the server writes for a multi-action rule
   AssertionError: expected [ 'INVALID_PERMISSION_ENTRY', …(1) ] to not include 
'INVALID_PERMISSION_ENTRY'
    FAIL  src/utils/aclRiskDiagnostics.test.ts > ACL risk diagnostics > counts 
a comma-joined default permission as an allow
   AssertionError: expected +0 to be 1 // Object.is equality
    FAIL  src/utils/aclRiskDiagnostics.test.ts > ACL risk diagnostics > ranks a 
publish+subscribe wildcard as full access
   AssertionError: expected [ { …(8) }, { …(8) } ] to deeply equal 
ArrayContaining{…}
         Tests  3 failed | 4 passed (7)
   ```
   
   **Coverage note** — the wider command above also reports `Errors 6 errors`: 
unhandled `act(...)`
   warnings raised by `src/utils/resourceCsvImport.test.ts` (which passes 14/14 
when run alone). They
   are pre-existing in that file, unrelated to this change, and do not fail the 
run.
   
   No code, test or description change was needed for this PR — the 
description, the tests and the
   numbers all held up.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to