update KeyCloakConfig like in the KeycloakDemo
Co-authored-by: LukasEttel <lukas.ettie@yahoo.de> Co-authored-by: AndiBuls <andreas.buls@uni-duesseldorf.de>
This commit is contained in:
@ -11,6 +11,7 @@ import mops.gruppen2.service.APIFormatterService;
|
||||
import mops.gruppen2.service.EventService;
|
||||
import mops.gruppen2.service.GroupService;
|
||||
import mops.gruppen2.service.SerializationService;
|
||||
import org.springframework.security.access.annotation.Secured;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -33,6 +34,7 @@ public class APIController {
|
||||
}
|
||||
|
||||
@GetMapping("/updateGroups/{status}")
|
||||
@Secured("ROLE_api_user")
|
||||
@ApiOperation(value = "Gibt alle Gruppen zurück in denen sich etwas geändert hat")
|
||||
public UpdatedGroupRequestMapper updateGroup(@ApiParam("Letzter Status des Anfragestellers") @PathVariable Long status) throws EventException {
|
||||
List<Event> events = eventService.getNewEvents(status);
|
||||
|
||||
@ -14,6 +14,7 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
@ -27,6 +28,8 @@ public class Gruppen2Controller {
|
||||
|
||||
@Autowired
|
||||
Gruppen2Config gruppen2Config;
|
||||
@Autowired
|
||||
RestTemplate serviceAccountRestTemplate;
|
||||
|
||||
private final KeyCloakService keyCloakService;
|
||||
private final EventService eventService;
|
||||
|
||||
Reference in New Issue
Block a user