[
https://issues.apache.org/jira/browse/RANGER-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiayi Liu resolved RANGER-2896.
-------------------------------
Resolution: Won't Fix
> show grant not display grant_time in hive plugin
> ------------------------------------------------
>
> Key: RANGER-2896
> URL: https://issues.apache.org/jira/browse/RANGER-2896
> Project: Ranger
> Issue Type: Improvement
> Components: admin, plugins
> Affects Versions: 2.0.0
> Reporter: Jiayi Liu
> Priority: Major
> Fix For: 2.1.0
>
> Attachments: 0001-RANGER-2896.patch
>
>
> show grant can not display grant_time, because
> [RANGER-836|https://issues.apache.org/jira/browse/RANGER-836] pruned the
> content of policy download.
> When using show grant, grant_time will always be 0.
> In RangerHiveAuthorizer.createHivePrivilegeInfo function, it gets
> creationDate from policy.getCreateTime().
> {code:java}
> if (accessTypes.contains(aclName.toLowerCase()) &&
> (users.contains(hivePrincipal.getName()) ||
> groups.contains(hivePrincipal.getName()))) {
> creationDate = (policy.getCreateTime() == null) ? creationDate : (int)
> (policy.getCreateTime().getTime()/1000);
> delegateAdmin = (policyItem.getDelegateAdmin() == null) ? delegateAdmin :
> policyItem.getDelegateAdmin().booleanValue();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)