Skip to content
Snippets Groups Projects

Resolve "[Queue-2.0] Slot selection is shown to be open too much"

Files

+ 18
0
@@ -181,6 +181,24 @@ public class LabController {
return "redirect:/lab/" + lab.getId();
}
/**
* Handles post request to the close enqueue page. This simply handles a button press to close or open
* enqueueing in a lab manually.
*
* @param lab The lab that is to be closed or opened manually.
* @param closeEnqueue Whether to open or to close.
* @return A redirect to the lab overview page.
*/
@Transactional
@PostMapping("/lab/{lab}/close-enqueue/{closeEnqueue}")
@PreAuthorize("@permissionService.canManageLab(#lab)")
public String closeEnqueueInLab(@PathEntity Lab lab,
@PathVariable Boolean closeEnqueue) {
lab.setEnqueueClosed(closeEnqueue);
return "redirect:/lab/" + lab.getId();
}
/**
* Performs the 'revoke request' command and redirects the user back to the lab overview page.
*
Loading