1

fix search

remove your Group from search

Co-Authored-By: andibuls <andibuls@users.noreply.github.com>
This commit is contained in:
tomvahl
2020-03-18 15:09:14 +01:00
parent ecd6154580
commit 522d1369ec
2 changed files with 13 additions and 5 deletions

View File

@ -99,9 +99,10 @@ public class Gruppen2Controller {
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator"})
@GetMapping("/findGroup")
public String findGroup(KeycloakAuthenticationToken token, Model model, @RequestParam(value = "suchbegriff", required = false) String suchbegriff) throws EventException {
Account account = keyCloakService.createAccountFromPrincipal(token);
List<Group> groupse = new ArrayList<>();
if (suchbegriff != null) {
groupse = groupService.findGroupWith(suchbegriff);
groupse = groupService.findGroupWith(suchbegriff,account);
}
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
model.addAttribute("gruppen", groupse);