> On April 4, 2014, 3:30 a.m., Brock Noland wrote: > > I think the role op should be SHOW_CURRENT_ROLE: > > https://github.com/apache/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/authorization/HiveAuthorizationTaskFactoryImpl.java#L332 > > > > Since I believe this op is just for the current user I don't think we need > > to get anything from the AST. > > > > SHOW CURRENT ROLES; <-- shows my current roles
Ah, thanks for the catch Brock! Fixed it in the updated patch. - Sravya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19980/#review39509 ----------------------------------------------------------- On April 15, 2014, 1:34 a.m., Sravya Tirukkovalur wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19980/ > ----------------------------------------------------------- > > (Updated April 15, 2014, 1:34 a.m.) > > > Review request for sentry, Brock Noland, Prasad Mujumdar, Shreepadma > Venugopalan, and Xuefu Zhang. > > > Bugs: sentry-165 > https://issues.apache.org/jira/browse/sentry-165 > > > Repository: sentry > > > Description > ------- > > HIVE-6793 added a new function, createShowRolesTask() to the > HiveAuthorizationTaskFactory interface. I have basically mimicked the > upstream implementation here: > https://issues.apache.org/jira/secure/attachment/12637896/HIVE-6793.patch > > But the only thing I am not sure about is this part: > new RoleDDLDesc(null, null, RoleDDLDesc.RoleOperation.SHOW_ROLES, null); > principalType, principalName, roleName = null. > > Looks like we should be getting these values from the ast as in here? > https://github.com/apache/incubator-sentry/blob/master/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/SentryHiveAuthorizationTaskFactoryImpl.java#L85 > > > Diffs > ----- > > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/SentryHiveAuthorizationTaskFactoryImpl.java > de0e460a982dc72f7f2dff3f53ea80cbc6945475 > > sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestSentryHiveAuthorizationTaskFactory.java > a61f609821cb143972d0333571df9837405740aa > > Diff: https://reviews.apache.org/r/19980/diff/ > > > Testing > ------- > > Compile and existing tests pass. > > > Thanks, > > Sravya Tirukkovalur > >
