Repository: nifi
Updated Branches:
  refs/heads/master d3b167481 -> 9e7610ac7


NIFI-5815 - PutORC processor 'Restricted' still requires access to restricted 
components regardless of restriction

This closes #3169.

Signed-off-by: Koji Kawamura <ijokaruma...@apache.org>


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

Branch: refs/heads/master
Commit: 9e7610ac70c389ecfb3a4d389e4e28a41249af2b
Parents: d3b1674
Author: Pierre Villard <pierre.villard...@gmail.com>
Authored: Mon Nov 12 20:22:03 2018 +0100
Committer: Koji Kawamura <ijokaruma...@apache.org>
Committed: Wed Nov 14 13:50:00 2018 +0900

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/processors/orc/PutORC.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/9e7610ac/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/orc/PutORC.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/orc/PutORC.java
 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/orc/PutORC.java
index 9af566a..8dfbc96 100644
--- 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/orc/PutORC.java
+++ 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/orc/PutORC.java
@@ -25,12 +25,14 @@ import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
 import org.apache.nifi.annotation.behavior.InputRequirement;
 import org.apache.nifi.annotation.behavior.ReadsAttribute;
 import org.apache.nifi.annotation.behavior.Restricted;
+import org.apache.nifi.annotation.behavior.Restriction;
 import org.apache.nifi.annotation.behavior.WritesAttribute;
 import org.apache.nifi.annotation.behavior.WritesAttributes;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.components.AllowableValue;
 import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.RequiredPermission;
 import org.apache.nifi.expression.ExpressionLanguageScope;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.processor.DataUnit;
@@ -63,7 +65,11 @@ import java.util.List;
                 + "the path is the directory that contains this ORC file on 
HDFS. For example, this processor can send flow files downstream to ReplaceText 
to set the content "
                 + "to this DDL (plus the LOCATION clause as described), then 
to PutHiveQL processor to create the table if it doesn't exist.")
 })
-@Restricted("Provides operator the ability to write to any file that NiFi has 
access to in HDFS or the local filesystem.")
+@Restricted(restrictions = {
+        @Restriction(
+                requiredPermission = RequiredPermission.WRITE_FILESYSTEM,
+                explanation = "Provides operator the ability to write to any 
file that NiFi has access to in HDFS or the local filesystem.")
+})
 public class PutORC extends AbstractPutHDFSRecord {
 
     public static final String HIVE_DDL_ATTRIBUTE = "hive.ddl";

Reply via email to