zjncs opened a new pull request, #5828:
URL: https://github.com/apache/rocketmq-dashboard/pull/5828

   ### What
   
   `AuthenticatedUserContext` holds the authenticated Studio principal for the 
current request thread. It had no test. This adds 6 tests.
   
   ### What is pinned
   
   - **a blank or missing username clears the context** instead of installing 
garbage;
   - a user id **round-trips as a string**; a null id removes the previous one;
   - **a username-only login defaults to non-admin**;
   - **an unset context reads as the system actor**, including the intentional 
`admin-or-system` fallback that lets background threads (no request principal) 
pass privileged checks;
   - **the context does not leak across threads**.
   
   ### Verification
   
   - New tests on unmodified code: **6/6 green**, checkstyle clean.
   - Discriminating mutation: the null-admin fallback in 
`currentUserIsAdminOrSystem()` inverted (red).
   - Restored: 6/6 green. Test-only change; no product code touched.
   


-- 
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