You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2020/05/19 08:42:34 UTC
[incubator-dolphinscheduler] branch dev-1.3.0 updated: fix
2598:change getId to getUserId (#2757)
This is an automated email from the ASF dual-hosted git repository.
leonbao pushed a commit to branch dev-1.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
new 911053e fix 2598:change getId to getUserId (#2757)
911053e is described below
commit 911053ebfccdd0f2038b3c5da461e98654ec3c18
Author: lgcareer <18...@163.com>
AuthorDate: Tue May 19 16:42:26 2020 +0800
fix 2598:change getId to getUserId (#2757)
* fix #2598:allow to update resource suffix,but if it is authorized to other users,it is not allowed.
* add RESOURCE_IS_AUTHORIZED status
* verify whether the suffix is empty
* remove extra variables
* fix code smell
* change getId to getUserId
---
.../java/org/apache/dolphinscheduler/api/service/ResourcesService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
index 4b847e7..18ffa50 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
@@ -368,7 +368,7 @@ public class ResourcesService extends BaseService {
List<ResourcesUser> resourcesUsers = resourceUserMapper.selectByMap(columnMap);
if (CollectionUtils.isNotEmpty(resourcesUsers)) {
- List<Integer> userIds = resourcesUsers.stream().map(ResourcesUser::getId).collect(Collectors.toList());
+ List<Integer> userIds = resourcesUsers.stream().map(ResourcesUser::getUserId).collect(Collectors.toList());
List<User> users = userMapper.selectBatchIds(userIds);
String userNames = users.stream().map(User::getUserName).collect(Collectors.toList()).toString();
logger.error("resource is authorized to user {},suffix not allowed to be modified", userNames);