Skip to content

Commit

Permalink
Update RangerSparkExtensionSuite.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Nov 3, 2023
1 parent 8b5a650 commit 651f3f6
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,18 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
|USING parquet
|SELECT * FROM $db1.$table1""".stripMargin))

interceptContains[AccessControlException](
doAs(
someone,
sql(
s"""
|INSERT OVERWRITE DIRECTORY '$path'
|USING parquet
|SELECT * FROM $db1.$table1""".stripMargin))
)(s"does not have [select] privilege on " +
s"[$db1/$table1/id,$db1/$table1/scope,[$path, $path/]]")

doAs(admin, sql(s"SELECT * FROM parquet.`$path`".stripMargin).explain(true))
interceptContains[AccessControlException](
doAs(someone, sql(s"SELECT * FROM parquet.`$path`".stripMargin).explain(true)))(
s"does not have [select] privilege on " +
Expand Down

0 comments on commit 651f3f6

Please sign in to comment.