You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by jo...@apache.org on 2020/02/07 07:28:36 UTC
[incubator-dolphinscheduler] branch 1.2.1-release updated: get
authorized udf resources need exclude all created by self (#1905)
This is an automated email from the ASF dual-hosted git repository.
journey pushed a commit to branch 1.2.1-release
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/1.2.1-release by this push:
new 8076779 get authorized udf resources need exclude all created by self (#1905)
8076779 is described below
commit 8076779c0288931eeb5dcfd5ad96c007bd73c4eb
Author: lgcareer <18...@163.com>
AuthorDate: Fri Feb 7 15:28:22 2020 +0800
get authorized udf resources need exclude all created by self (#1905)
* get authorized udf resources need exclude all created by self
* reset pom version to 1.2.1-SNAPSHOT
---
dolphinscheduler-alert/pom.xml | 2 +-
dolphinscheduler-api/pom.xml | 2 +-
.../org/apache/dolphinscheduler/api/service/UsersService.java | 9 ++++-----
dolphinscheduler-common/pom.xml | 2 +-
dolphinscheduler-dao/pom.xml | 2 +-
dolphinscheduler-dist/pom.xml | 2 +-
dolphinscheduler-rpc/pom.xml | 2 +-
dolphinscheduler-server/pom.xml | 2 +-
dolphinscheduler-ui/pom.xml | 2 +-
pom.xml | 2 +-
10 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/dolphinscheduler-alert/pom.xml b/dolphinscheduler-alert/pom.xml
index 79769d7..ead46f5 100644
--- a/dolphinscheduler-alert/pom.xml
+++ b/dolphinscheduler-alert/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-alert</artifactId>
<name>${project.artifactId}</name>
diff --git a/dolphinscheduler-api/pom.xml b/dolphinscheduler-api/pom.xml
index 0e48bf4..06a444a 100644
--- a/dolphinscheduler-api/pom.xml
+++ b/dolphinscheduler-api/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-api</artifactId>
<name>${project.artifactId}</name>
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
index e9f6e0a..2f0ed04 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
@@ -442,12 +442,11 @@ public class UsersService extends BaseService {
if (StringUtils.isNotEmpty(resourceIds)) {
needAuthorizedIds = Arrays.stream(resourcesIdArr).map(t->Integer.parseInt(t)).collect(Collectors.toSet());
}
- //if resource type is UDF,need check whether it is bound by UDF functon
-
- //get the authorized resource id list by user id and resource type
- List<Resource> oldAuthorizedUdfRes = resourceMapper.queryResourceListAuthored(userId, ResourceType.UDF.ordinal());
- Set<Integer> oldAuthorizedUdfResIds = oldAuthorizedUdfRes.stream().map(t -> t.getId()).collect(Collectors.toSet());
+ //get the authorized resource id list by user id
+ List<Resource> oldAuthorizedRes = resourceMapper.queryAuthorizedResourceList(userId);
+ //if resource type is UDF,need check whether it is bound by UDF functon
+ Set<Integer> oldAuthorizedUdfResIds = oldAuthorizedRes.stream().filter(t->t.getType().equals(ResourceType.UDF)).map(t -> t.getId()).collect(Collectors.toSet());
//get the unauthorized resource id list
oldAuthorizedUdfResIds.removeAll(needAuthorizedIds);
diff --git a/dolphinscheduler-common/pom.xml b/dolphinscheduler-common/pom.xml
index 98bf193..1bfac57 100644
--- a/dolphinscheduler-common/pom.xml
+++ b/dolphinscheduler-common/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-common</artifactId>
<name>dolphinscheduler-common</name>
diff --git a/dolphinscheduler-dao/pom.xml b/dolphinscheduler-dao/pom.xml
index 34a4486..85467e1 100644
--- a/dolphinscheduler-dao/pom.xml
+++ b/dolphinscheduler-dao/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-dao</artifactId>
<name>${project.artifactId}</name>
diff --git a/dolphinscheduler-dist/pom.xml b/dolphinscheduler-dist/pom.xml
index 6e6cfc3..5e44a9a 100644
--- a/dolphinscheduler-dist/pom.xml
+++ b/dolphinscheduler-dist/pom.xml
@@ -20,7 +20,7 @@
<parent>
<artifactId>dolphinscheduler</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/dolphinscheduler-rpc/pom.xml b/dolphinscheduler-rpc/pom.xml
index 8e86923..f0ac1a0 100644
--- a/dolphinscheduler-rpc/pom.xml
+++ b/dolphinscheduler-rpc/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/dolphinscheduler-server/pom.xml b/dolphinscheduler-server/pom.xml
index afad6fb..2ccc880 100644
--- a/dolphinscheduler-server/pom.xml
+++ b/dolphinscheduler-server/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-server</artifactId>
<name>dolphinscheduler-server</name>
diff --git a/dolphinscheduler-ui/pom.xml b/dolphinscheduler-ui/pom.xml
index c7fc37e..28f584f 100644
--- a/dolphinscheduler-ui/pom.xml
+++ b/dolphinscheduler-ui/pom.xml
@@ -20,7 +20,7 @@
<parent>
<artifactId>dolphinscheduler</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index 1d80e11..be0ab3a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<url>http://dolphinscheduler.apache.org</url>