Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7199

HsJobsBlock reuse JobACLsManager for checkAccess

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Reuse JobAclManager.checkAccess

       
       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;
        }
      
      jobACLsManager
                .checkAccess(ugi, JobACL.VIEW_JOB, ..
                    new AccessControlList()))
      

        Attachments

        1. MAPREDUCE-7199.002.patch
          3 kB
          Bilwa S T
        2. MAPREDUCE-7199.003.patch
          4 kB
          Bilwa S T
        3. MAPREDUCE-7199-001.patch
          3 kB
          Bilwa S T

          Activity

            People

            • Assignee:
              BilwaST Bilwa S T
              Reporter:
              bibinchundatt Bibin Chundatt
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: