> On 四月 10, 2020, 6:38 a.m., Madhan Neethiraj wrote: > > ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java > > Line 106 (original), 106 (patched) > > <https://reviews.apache.org/r/72061/diff/1/?file=2210036#file2210036line106> > > > > deactivatePluginClassLoader() should be called before the shim method > > returns - as shown below: > > > > try { > > activatePluginClassLoader(); > > > > return systemAccessControlImpl.filterCatalogs(identity, catalogs); > > } finally { > > deactivatePluginClassLoader(); > > } > > > > Please review and update other methods as well (#167,#229).
OK, I will fix this. - Jiayi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72061/#review220277 ----------------------------------------------------------- On 四月 23, 2020, 3:23 a.m., Jiayi Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72061/ > ----------------------------------------------------------- > > (Updated 四月 23, 2020, 3:23 a.m.) > > > Review request for ranger, Don Bosco Durai, Colm O hEigeartaigh, Abhay > Kulkarni, Madhan Neethiraj, Mehul Parikh, Nitin Galave, pengjianhua, Pradeep > Agrawal, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Zsombor > Gegesy. > > > Bugs: RANGER-2716 > https://issues.apache.org/jira/browse/RANGER-2716 > > > Repository: ranger > > > Description > ------- > > Presto plugin returns the input set of catalogs/schemas/tables directly at > present. However, this causes a problem, that is, when the user uses show > catalogs/schemas/tables, all catalogs/schemas/tables are displayed, even > though the user does not have the permissions to display all > catalogs/schemas/tables. > > We need to fix the filterCatalogs/Schemas/Tables functions to filter > catalogs/schemas/tables, so that the user can only see the > catalogs/schemas/tables in which the user has SELECT permission. > > > Diffs > ----- > > > plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java > 3ab63f590 > > ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java > e89f646e1 > > > Diff: https://reviews.apache.org/r/72061/diff/2/ > > > Testing > ------- > > show catalogs/schemas/tables only display the catalogs/schemas/tables in > which the user has SELECT permission. > > > Thanks, > > Jiayi Liu > >
