1

added @Secured and fixed

Co-authored-by: LukasEttel <lukas.ettie@yahoo.de>
Co-authored-by: AndiBuls <andreas.buls@uni-duesseldorf.de>
This commit is contained in:
[Mahgs]
2020-03-16 15:40:46 +01:00
parent 3f144d14e4
commit e12f0c1d59
2 changed files with 4 additions and 5 deletions

View File

@ -44,12 +44,15 @@ public class APIController {
}
@GetMapping("/getGroupIdsOfUser/{teilnehmer}")
@Secured("ROLE_api_user")
@ApiOperation(value = "Gibt alle Gruppen zurück in denen sich ein Teilnehmer befindet")
public List<Long> getGroupsOfUser(@ApiParam("Teilnehmer dessen groupIds zurückgegeben werden sollen") @PathVariable String teilnehmer) throws EventException {
return eventService.getGroupsOfUser(teilnehmer);
}
@GetMapping("/getGroup/{groupId}")
@Secured("ROLE_api_user")
@ApiOperation(value = "Gibt die Gruppe mit der als Parameter mitgegebenden groupId zurück")
public Group getGroupFromId(@ApiParam("GruppenId der gefordeten Gruppe") @PathVariable Long groupId) throws EventException{
List<Event> eventList = eventService.getEventsOfGroup(groupId);