ruanwenjun commented on code in PR #12576:
URL:
https://github.com/apache/dolphinscheduler/pull/12576#discussion_r1011045230
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java:
##########
@@ -863,41 +863,43 @@ public Map<String, Object> queryResourceList(User
loginUser, ResourceType type,
}
String tenantCode = tenant.getTenantCode();
- String defaultPath = "";
+ String defaultPath = EMPTY_STRING;
List<StorageEntity> resourcesList = new ArrayList<>();
- if (StringUtils.isBlank(fullName)) {
- if (isAdmin(loginUser)) {
- List<User> userList = userMapper.selectList(null);
- Set<String> visitedTenantEntityCode = new HashSet<>();
- for (User userEntity : userList) {
- Tenant tt =
tenantMapper.queryById(userEntity.getTenantId());
- String tenantEntityCode =
tenantMapper.queryById(userEntity.getTenantId()).getTenantCode();
- if (!visitedTenantEntityCode.contains(tenantEntityCode)) {
- defaultPath =
storageOperate.getResDir(tenantEntityCode);
- if (type.equals(ResourceType.UDF)) {
- defaultPath =
storageOperate.getUdfDir(tenantEntityCode);
+ if (PropertyUtils.getResUploadStartupState()) {
Review Comment:
Please directly return if `PropertyUtils.getResUploadStartupState() == false`
--
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]