Skip to content

Commit

Permalink
feat: set the security context for the data collection job
Browse files Browse the repository at this point in the history
OCD-4516
  • Loading branch information
tmy1313 committed Jan 3, 2025
1 parent 85fbe08 commit 8b7f60e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import gov.healthit.chpl.domain.CertificationBody;
import gov.healthit.chpl.domain.Developer;
import gov.healthit.chpl.manager.CertificationBodyManager;
import gov.healthit.chpl.scheduler.SchedulerSecurityContextService;
import gov.healthit.chpl.scheduler.job.QuartzJob;
import gov.healthit.chpl.scheduler.job.developer.attestation.DeveloperAttestationPeriodCalculator;
import gov.healthit.chpl.util.DateUtil;
Expand Down Expand Up @@ -66,13 +67,16 @@ public class AttestationReportCreatorJob extends QuartzJob {
@Autowired
private AttestationCertificationBodyService attestationCertificationBodyService;


@Autowired
private SchedulerSecurityContextService securityContextService;

@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);

LOGGER.info("********* Starting Attestation Report Creator job. *********");
securityContextService.setAdminSecurityContext();

// We need to manually create a transaction in this case because of how
// AOP works. When a method is annotated with @Transactional, the transaction
// wrapper is only added if the object's proxy is called. The object's proxy is
Expand Down

0 comments on commit 8b7f60e

Please sign in to comment.