[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082254#comment-17082254
 ] 

Bilwa S T commented on MAPREDUCE-7199:
--------------------------------------

Hi [~surendrasingh] 
i have attached a new patch. As part of MAPREDUCE-7097 addendum it was added 
that job owner and MR admin should be able to view job if filter entity list by 
user is enabled.  As JobACLManager takes care of verifying adminAcl there is no 
need to pass AdminACL
Please review latest patch

> HsJobsBlock reuse JobACLsManager for checkAccess
> ------------------------------------------------
>
>                 Key: MAPREDUCE-7199
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7199
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Bibin Chundatt
>            Assignee: Bilwa S T
>            Priority: Minor
>         Attachments: MAPREDUCE-7199-001.patch, MAPREDUCE-7199.002.patch, 
> MAPREDUCE-7199.003.patch
>
>
> Reuse JobAclManager.checkAccess
> {code} 
>  private boolean checkAccess(String userName) {
>     if(!areAclsEnabled) {
>       return true;
>     }
>     // User could see its own job.
>     if (ugi.getShortUserName().equals(userName)) {
>       return true;
>     }
>     // Admin could also see all jobs
>     if (adminAclList != null && adminAclList.isUserAllowed(ugi)) {
>       return true;
>     }
>     return false;
>   }
> {code} 
> {code}
> jobACLsManager
>           .checkAccess(ugi, JobACL.VIEW_JOB, ..
>               new AccessControlList()))
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org

Reply via email to