MAPREDUCE-6033. Updated access check for displaying job information
(Yu Gao via Eric Yang) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1618649 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e4b1a7696c
commit
0b20086da1
|
@ -162,6 +162,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
MAPREDUCE-6033. Updated access check for displaying job information
|
||||||
|
(Yu Gao via Eric Yang)
|
||||||
|
|
||||||
MAPREDUCE-5759. Remove unnecessary conf load in Limits (Sandy Ryza)
|
MAPREDUCE-5759. Remove unnecessary conf load in Limits (Sandy Ryza)
|
||||||
|
|
||||||
MAPREDUCE-5014. Extend Distcp to accept a custom CopyListing.
|
MAPREDUCE-5014. Extend Distcp to accept a custom CopyListing.
|
||||||
|
|
|
@ -730,7 +730,7 @@ public class JobImpl implements org.apache.hadoop.mapreduce.v2.app.job.Job,
|
||||||
if (jobACL == null) {
|
if (jobACL == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return aclsManager.checkAccess(callerUGI, jobOperation, username, jobACL);
|
return aclsManager.checkAccess(callerUGI, jobOperation, userName, jobACL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -536,7 +536,7 @@ public class TestJobImpl {
|
||||||
|
|
||||||
// Verify access
|
// Verify access
|
||||||
JobImpl job1 = new JobImpl(jobId, null, conf1, null, null, null, null, null,
|
JobImpl job1 = new JobImpl(jobId, null, conf1, null, null, null, null, null,
|
||||||
null, null, null, true, null, 0, null, null, null, null);
|
null, null, null, true, user1, 0, null, null, null, null);
|
||||||
Assert.assertTrue(job1.checkAccess(ugi1, JobACL.VIEW_JOB));
|
Assert.assertTrue(job1.checkAccess(ugi1, JobACL.VIEW_JOB));
|
||||||
Assert.assertFalse(job1.checkAccess(ugi2, JobACL.VIEW_JOB));
|
Assert.assertFalse(job1.checkAccess(ugi2, JobACL.VIEW_JOB));
|
||||||
|
|
||||||
|
@ -547,7 +547,7 @@ public class TestJobImpl {
|
||||||
|
|
||||||
// Verify access
|
// Verify access
|
||||||
JobImpl job2 = new JobImpl(jobId, null, conf2, null, null, null, null, null,
|
JobImpl job2 = new JobImpl(jobId, null, conf2, null, null, null, null, null,
|
||||||
null, null, null, true, null, 0, null, null, null, null);
|
null, null, null, true, user1, 0, null, null, null, null);
|
||||||
Assert.assertTrue(job2.checkAccess(ugi1, JobACL.VIEW_JOB));
|
Assert.assertTrue(job2.checkAccess(ugi1, JobACL.VIEW_JOB));
|
||||||
Assert.assertTrue(job2.checkAccess(ugi2, JobACL.VIEW_JOB));
|
Assert.assertTrue(job2.checkAccess(ugi2, JobACL.VIEW_JOB));
|
||||||
|
|
||||||
|
@ -558,7 +558,7 @@ public class TestJobImpl {
|
||||||
|
|
||||||
// Verify access
|
// Verify access
|
||||||
JobImpl job3 = new JobImpl(jobId, null, conf3, null, null, null, null, null,
|
JobImpl job3 = new JobImpl(jobId, null, conf3, null, null, null, null, null,
|
||||||
null, null, null, true, null, 0, null, null, null, null);
|
null, null, null, true, user1, 0, null, null, null, null);
|
||||||
Assert.assertTrue(job3.checkAccess(ugi1, JobACL.VIEW_JOB));
|
Assert.assertTrue(job3.checkAccess(ugi1, JobACL.VIEW_JOB));
|
||||||
Assert.assertTrue(job3.checkAccess(ugi2, JobACL.VIEW_JOB));
|
Assert.assertTrue(job3.checkAccess(ugi2, JobACL.VIEW_JOB));
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ public class TestJobImpl {
|
||||||
|
|
||||||
// Verify access
|
// Verify access
|
||||||
JobImpl job4 = new JobImpl(jobId, null, conf4, null, null, null, null, null,
|
JobImpl job4 = new JobImpl(jobId, null, conf4, null, null, null, null, null,
|
||||||
null, null, null, true, null, 0, null, null, null, null);
|
null, null, null, true, user1, 0, null, null, null, null);
|
||||||
Assert.assertTrue(job4.checkAccess(ugi1, JobACL.VIEW_JOB));
|
Assert.assertTrue(job4.checkAccess(ugi1, JobACL.VIEW_JOB));
|
||||||
Assert.assertTrue(job4.checkAccess(ugi2, JobACL.VIEW_JOB));
|
Assert.assertTrue(job4.checkAccess(ugi2, JobACL.VIEW_JOB));
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ public class TestJobImpl {
|
||||||
|
|
||||||
// Verify access
|
// Verify access
|
||||||
JobImpl job5 = new JobImpl(jobId, null, conf5, null, null, null, null, null,
|
JobImpl job5 = new JobImpl(jobId, null, conf5, null, null, null, null, null,
|
||||||
null, null, null, true, null, 0, null, null, null, null);
|
null, null, null, true, user1, 0, null, null, null, null);
|
||||||
Assert.assertTrue(job5.checkAccess(ugi1, null));
|
Assert.assertTrue(job5.checkAccess(ugi1, null));
|
||||||
Assert.assertTrue(job5.checkAccess(ugi2, null));
|
Assert.assertTrue(job5.checkAccess(ugi2, null));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue