Skip to content

Commit efb17c3

Browse files
committed
feat: scheduler does not need access to all schedule endpoints
1 parent 6643436 commit efb17c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/fr/insee/genesis/controller/rest/ScheduleController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public ResponseEntity<Object> getAllSchedules() {
6161

6262
@Operation(summary = "Schedule a Kraftwerk execution")
6363
@PutMapping(path = "/create")
64-
@PreAuthorize("hasRole('SCHEDULER')")
64+
@PreAuthorize("hasRole('ADMIN')")
6565
public ResponseEntity<Object> addSchedule(
6666
@Parameter(description = "Survey name to call Kraftwerk on") @RequestParam("surveyName") String surveyName,
6767
@Parameter(description = "Kraftwerk endpoint") @RequestParam(value = "serviceTocall", defaultValue = Constants.KRAFTWERK_MAIN_ENDPOINT) ServiceToCall serviceToCall,
@@ -109,7 +109,7 @@ public ResponseEntity<Object> addSchedule(
109109

110110
@Operation(summary = "Delete a Kraftwerk execution schedule(s) by its survey name")
111111
@DeleteMapping(path = "/delete")
112-
@PreAuthorize("hasRole('SCHEDULER')")
112+
@PreAuthorize("hasRole('ADMIN')")
113113
public ResponseEntity<Object> deleteSchedule(
114114
@Parameter(description = "Survey name of the schedule(s) to delete") @RequestParam("surveyName") String surveyName
115115
){

0 commit comments

Comments
 (0)