coder999o opened a new pull request, #5051: URL: https://github.com/apache/rocketmq-dashboard/pull/5051
## What is the purpose of the change Clear `AuthenticatedUserContext` when `AuthInterceptor` rejects an authenticated non-admin request with `403`. The interceptor sets the per-thread user context before checking admin-only routes. When `preHandle` returns `false` for a forbidden request, the request is blocked before controller execution, so this path should clean the context before returning. ## Brief changelog - Clear `AuthenticatedUserContext` before returning forbidden for non-admin admin-only requests. - Add a regression assertion for the rejected mutating request path. ## Verifying this change - `git diff --check` - `cd server && mvn -Dtest=AuthInterceptorTest test` -- 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]
