sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-2220: Sqoop2: Fix the privilege check on job using the link id not the connector id
Date Tue, 24 Mar 2015 06:43:30 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 598607cde -> d615b39c1


SQOOP-2220: Sqoop2: Fix the privilege check on job using the link id not the connector id

(Guoquan Shen via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/d615b39c
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/d615b39c
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/d615b39c

Branch: refs/heads/sqoop2
Commit: d615b39c1097af7ccc3b554705a8d5f4b0a7d2f5
Parents: 598607c
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Mar 23 23:34:25 2015 -0700
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Mar 23 23:34:25 2015 -0700

----------------------------------------------------------------------
 common/src/main/java/org/apache/sqoop/model/MJob.java        | 8 ++++++++
 .../java/org/apache/sqoop/handler/JobRequestHandler.java     | 8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/d615b39c/common/src/main/java/org/apache/sqoop/model/MJob.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/sqoop/model/MJob.java b/common/src/main/java/org/apache/sqoop/model/MJob.java
index 4b5c896..1c24103 100644
--- a/common/src/main/java/org/apache/sqoop/model/MJob.java
+++ b/common/src/main/java/org/apache/sqoop/model/MJob.java
@@ -130,6 +130,14 @@ public class MJob extends MAccountableEntity implements MClonable {
     }
   }
 
+  public long getFromLinkId() {
+    return fromLinkId;
+  }
+
+  public long getToLinkId() {
+    return toLinkId;
+  }
+
   public long getConnectorId(Direction type) {
     switch(type) {
       case FROM:

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d615b39c/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
index 70108f6..0c5f1f2 100644
--- a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
@@ -185,11 +185,11 @@ public class JobRequestHandler implements RequestHandler {
 
     // Authorization check
     if (create) {
-      AuthorizationEngine.createJob(String.valueOf(postedJob.getFromConnectorId()),
-              String.valueOf(postedJob.getToConnectorId()));
+      AuthorizationEngine.createJob(String.valueOf(postedJob.getFromLinkId()),
+              String.valueOf(postedJob.getToLinkId()));
     } else {
-      AuthorizationEngine.updateJob(String.valueOf(postedJob.getFromConnectorId()),
-              String.valueOf(postedJob.getToConnectorId()),
+      AuthorizationEngine.updateJob(String.valueOf(postedJob.getFromLinkId()),
+              String.valueOf(postedJob.getToLinkId()),
               String.valueOf(postedJob.getPersistenceId()));
     }
 


Mime
View raw message