ranger icon indicating copy to clipboard operation
ranger copied to clipboard

RANGER-3193 checkCanCreateViewWithSelectFromColumns to do check on select table and columns

Open hereisharish opened this issue 4 years ago • 0 comments

Presto query -> Create view db1.view1 as select * from db2.table1 -> this query has two checks check 1 - create view permission on db1 check 2 - select table columns permission on db2.table1

check 1 is done with method checkCanCreateView - all good here check 2 to be done with checkCanCreateViewWithSelectFromColumns has db2.table1 info in CatalogSchemaTableName

current checkCanCreateView inside checkCanCreateViewWithSelectFromColumns method does the check on create view permissions on db2 which is neither check 1 nor 2. Replacing checkCanCreateView with checkCanSelectFromColumns inside checkCanCreateViewWithSelectFromColumns will do the check 2

hereisharish avatar Aug 15 '21 06:08 hereisharish