-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54714/#review159051
-----------------------------------------------------------


Fix it, then Ship it!





hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
 (line 1020)
<https://reviews.apache.org/r/54714/#comment229985>

    Consider rewritting as below, to be consistent with other if/else blocks 
here:
    
      if(filestat != null && filestat.length > 0) {
        boolean isDenied = false;
    
        for(FileStatus file : filestat) {
          if(FileUtils.isOwnerOfFileHierarchy(fs, file, userName) ||
             FileUtils.isActionPermittedForFileHierarchy(fs, file, userName, 
action)) {
            continue;
          }
    
          isDenied = true;
          break;
        }
        
        ret = !isDenied;
      } else { // if given path does not exist then check for parent


- Madhan Neethiraj


On Dec. 13, 2016, 7:21 p.m., Ramesh Mani wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54714/
> -----------------------------------------------------------
> 
> (Updated Dec. 13, 2016, 7:21 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> RANGER-1254 : HiveAuthorizer should deny access to URI operation if there are 
> any exception
> 
> 
> Diffs
> -----
> 
>   
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
>  92fc2e7 
> 
> Diff: https://reviews.apache.org/r/54714/diff/
> 
> 
> Testing
> -------
> 
> Testing done in Local VM.
> 
> 
> Thanks,
> 
> Ramesh Mani
> 
>

Reply via email to