Copilot commented on code in PR #17246:
URL:
https://github.com/apache/dolphinscheduler/pull/17246#discussion_r2142233206
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java:
##########
@@ -237,12 +240,12 @@ public Result queryAllGroupPaging(User loginUser, Integer
pageNo, Integer pageSi
Result result = new Result();
List<WorkerGroupPageDetail> workerGroupPageDetails;
if (loginUser.getUserType().equals(UserType.ADMIN_USER)) {
- workerGroupPageDetails = getUiWorkerGroupPageDetails(null);
+ workerGroupPageDetails = getUiWorkerGroupPageDetailsByTenant(null,
tenantId);
} else {
Set<Integer> ids = resourcePermissionCheckService
.userOwnedResourceIdsAcquisition(AuthorizationType.WORKER_GROUP,
loginUser.getId(), log);
workerGroupPageDetails =
- getUiWorkerGroupPageDetails(ids.isEmpty() ?
Collections.emptyList() : new ArrayList<>(ids));
+ getUiWorkerGroupPageDetailsByTenant(ids.isEmpty() ?
Collections.emptyList() : new ArrayList<>(ids), tenantId);
Review Comment:
The result of the call to getUiWorkerGroupPageDetailsByTenant is not
assigned to a variable in the non-admin branch, which appears to be an
oversight. Please assign its result to workerGroupPageDetails to avoid
unintended behavior.
--
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]