private boolean checkPrivilegesForPartition(Partition partition, String userName, List<String> groupNames) {
    if (userName == null || userName.isEmpty()) {
      return true;
    }
    if (groupNames == null || groupNames.isEmpty()) {
      return true;
    }
    PrincipalPrivilegeSet privileges = partition.getPrivileges();
    if (privileges == null) {
      return true;
    }
    if (privileges.isSetUserPrivileges()) {
      if (!privileges.getUserPrivileges().containsKey(userName)) {
        return false;
      }
    }
    if (privileges.isSetGroupPrivileges()) {
      for (String group : groupNames) {
        if (!privileges.getGroupPrivileges().containsKey(group)) {
          return false;
        }
      }
    }
    return true;
  }
This stores partition information for a temp table.
ql/src/java/org/apache/hadoop/hive/ql/metadata/TempTable.java