yaooqinn commented on code in PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#discussion_r1382990284


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala:
##########
@@ -1133,4 +1133,21 @@ class HiveCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
       }
     }
   }
+
+  test("Add/List Jars/Files/Archives command") {
+    withTempDir { path =>
+      withSingleCallEnabled {
+        Seq("JAR", "FILE", "ARCHIVE").foreach { cmd =>
+          doAs(admin, sql(s"ADD $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"ADD $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")
+          doAs(admin, sql(s"LIST $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"LIST $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")

Review Comment:
   These are all wrong. If you use `LIST FILE`, you will get `path` returned, 
but if you specify `path` to  `LIST FILE`, errored?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to