IPentahoSession session = getSession();
final String principalName = session.getName(); // this authentication wasn't matching with the job user name,
// changed to get name via the current session
final Boolean canAdminister = canAdminister( session );
List<Job> jobs = getScheduler().getJobs( new IJobFilter() {
public boolean accept( Job job ) {
if ( canAdminister ) {
return !IBlockoutManager.BLOCK_OUT_JOB_NAME.equals( job.getJobName() );
}
return principalName.equals( job.getUserName() );