MAPREDUCE-3878. Null user on filtered jobhistory job page (Jonathon Eagles via tgraves)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1292831 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a2073cc61
commit
81f5c5933d
@ -136,6 +136,9 @@ Release 0.23.2 - UNRELEASED
|
|||||||
to the maven build. (Ravi Prakash via vinodkv)
|
to the maven build. (Ravi Prakash via vinodkv)
|
||||||
|
|
||||||
MAPREDUCE-3884. PWD should be first in the classpath of MR tasks (tucu)
|
MAPREDUCE-3884. PWD should be first in the classpath of MR tasks (tucu)
|
||||||
|
|
||||||
|
MAPREDUCE-3878. Null user on filtered jobhistory job page (Jonathon Eagles
|
||||||
|
via tgraves)
|
||||||
|
|
||||||
Release 0.23.1 - 2012-02-17
|
Release 0.23.1 - 2012-02-17
|
||||||
|
|
||||||
|
@ -343,9 +343,15 @@ void accessDenied(String s) {
|
|||||||
* @return True if the requesting user has permission to view the job
|
* @return True if the requesting user has permission to view the job
|
||||||
*/
|
*/
|
||||||
boolean checkAccess(Job job) {
|
boolean checkAccess(Job job) {
|
||||||
UserGroupInformation callerUgi = UserGroupInformation.createRemoteUser(
|
String remoteUser = request().getRemoteUser();
|
||||||
request().getRemoteUser());
|
UserGroupInformation callerUGI = null;
|
||||||
return job.checkAccess(callerUgi, JobACL.VIEW_JOB);
|
if (remoteUser != null) {
|
||||||
|
callerUGI = UserGroupInformation.createRemoteUser(remoteUser);
|
||||||
|
}
|
||||||
|
if (callerUGI != null && !job.checkAccess(callerUGI, JobACL.VIEW_JOB)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user