Skip to content
Snippets Groups Projects
Commit e5804ceb authored by Ruben Backx's avatar Ruben Backx :coffee:
Browse files

Merge branch 'timeslot-security-fix' into 'development'

Fix endpoint security on patch time slot

See merge request !805
parents 842cfdaf c7288dd7
No related branches found
No related tags found
2 merge requests!827New release: 3.4.0,!805Fix endpoint security on patch time slot
......@@ -52,6 +52,7 @@ public class TimeSlotController {
* @param patch The updated timeslot data.
*/
@PatchMapping("/time-slot/{timeSlot}")
@PreAuthorize("@permissionService.canManageTimeSlot(#timeSlot)")
public @ResponseBody void patchTimeSlot(@PathEntity TimeSlot timeSlot,
@RequestBody TimeSlotPatchDTO patch) {
tss.patchTimeSlot(timeSlot, patch);
......@@ -63,7 +64,7 @@ public class TimeSlotController {
* @param id The id of the timeslot to remove.
*/
@DeleteMapping("/time-slot/{timeSlot}")
@PreAuthorize("@permissionService.canManageTimeSlot()")
@PreAuthorize("@permissionService.canManageTimeSlot(#timeSlot)")
public @ResponseBody void deleteTimeSlot(@PathEntity TimeSlot timeSlot) {
tss.deleteTimeSlot(timeSlot);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment