[
https://issues.apache.org/jira/browse/MAPREDUCE-7199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shilun Fan updated MAPREDUCE-7199:
----------------------------------
Component/s: mrv2
Hadoop Flags: Reviewed
Target Version/s: 3.3.1, 3.4.0
Affects Version/s: 3.3.1
3.4.0
> HsJobsBlock reuse JobACLsManager for checkAccess
> ------------------------------------------------
>
> Key: MAPREDUCE-7199
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7199
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Components: mrv2
> Affects Versions: 3.4.0, 3.3.1
> Reporter: Bibin Chundatt
> Assignee: Bilwa S T
> Priority: Minor
> Fix For: 3.4.0, 3.3.1
>
> 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.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]