yyqdbngt commented on PR #4217:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4217#issuecomment-5691162373
Superseded by the current `rocketmq-studio` head, so I am closing this.
`AuthCorsIntegrationTest` was aligned to the single-session-resolution flow
on the base branch by commit `5158c010` (`feat(server): address Studio
instances by instanceId in the tool layer (#4308)`). `rocketmq-studio` at
`1e8cc591` already asserts exactly what this PR asked for:
```java
void shouldStillRejectAnonymousProtectedRequests() throws Exception {
...
verify(authService).getAuthenticatedUser(null);
}
void shouldRejectNonAdminMutationBeforeControllerExecution() throws
Exception {
String authorization = "Bearer reader-token";
when(authService.getAuthenticatedUser(authorization)).thenReturn(Optional.of(
LoginVO.UserInfo.builder().userId(2L).username("reader").admin(false).build()));
...
}
```
The only delta left in this branch is the extra `verify(authService,
never()).isAuthenticated(any())` line, which is not worth a separate PR against
a base that no longer routes anonymous requests through `isAuthenticated`.
Reopen if you want that assertion tracked separately.
--
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]