Skip to content
Snippets Groups Projects

Resolve "End lab sessions early"

Files

@@ -476,6 +476,14 @@ public class LabController {
.body(new ByteArrayResource(labCsvHelper.serializeToCsv(lab.getRequests())));
}
@PostMapping("/lab/{id}/close-enqueue/{close}")
@PreAuthorize("@permissionService.canEditLab(principal, #id)")
public String closeEnqueue(@PathVariable Long id, @PathVariable boolean close) {
labService.closeEnqueue(id, close);
return "redirect:/lab/" + id;
}
/**
* Handle {@link AccessDeniedException} when this is thrown in the LabController class.
*
Loading