code: @Override
      public List<WSJobInstance> getJobInstances(IJPAQueryHelper queryHelper, int page, int pageSize) throws NoSuchJobExecutionException, JobSecurityException {
  
          if (authService == null || authService.isAdmin() || authService.isMonitor()) {
              return new ArrayList<WSJobInstance>(persistenceManagerService.getJobInstances(queryHelper, page, pageSize));
          } else if (authService.isGroupAdmin() || authService.isGroupMonitor()) {
              queryHelper.setGroups(authService.getGroupsForSubject());
              queryHelper.setQueryIssuer(authService.getRunAsUser());
              return new ArrayList<WSJobInstance>(persistenceManagerService.getJobInstances(queryHelper, page, pageSize));
          } else if (authService.isSubmitter()) {
              queryHelper.setQueryIssuer(authService.getRunAsUser());
              return new ArrayList<WSJobInstance>(persistenceManagerService.getJobInstances(queryHelper, page, pageSize));
          }
  
          throw new JobSecurityException("The current user " + batchSecurityHelper.getRunAsUser() + " is not authorized to perform any batch operations.");
  
      }
docs: {@inheritDoc}