1

Merge branch 'dev' into TEST-event-tests

This commit is contained in:
Christoph
2020-03-30 10:47:07 +02:00
committed by GitHub
4 changed files with 19 additions and 14 deletions

View File

@ -4,13 +4,18 @@ on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
paths-ignore:
- 'documentation/**'
- 'mysql/**'
- 'README.adoc'
- 'Dockerfile'
- 'docker-compose.yaml'
- '.gitignore'
jobs:
build:
runs-on: ubuntu-latest

View File

@ -117,17 +117,4 @@ public class GroupCreationController {
return "redirect:/gruppen2";
}
@RolesAllowed({"ROLE_orga", "ROLE_actuator"})
@PostMapping("/details/members/addUsersFromCsv")
@CacheEvict(value = "groups", allEntries = true)
public String addUsersFromCsv(KeycloakAuthenticationToken token,
@RequestParam("group_id") String groupId,
@RequestParam(value = "file", required = false) MultipartFile file) {
Account account = KeyCloakService.createAccountFromPrincipal(token);
controllerService.addUsersFromCsv(account, file, groupId);
return "redirect:/gruppen2/details/members/" + groupId;
}
}

View File

@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.context.annotation.SessionScope;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.security.RolesAllowed;
import javax.servlet.http.HttpServletRequest;
@ -259,4 +260,17 @@ public class GroupDetailsController {
return "redirect:/gruppen2";
}
@RolesAllowed({"ROLE_orga", "ROLE_actuator"})
@PostMapping("/details/members/addUsersFromCsv")
@CacheEvict(value = "groups", allEntries = true)
public String addUsersFromCsv(KeycloakAuthenticationToken token,
@RequestParam("group_id") String groupId,
@RequestParam(value = "file", required = false) MultipartFile file) {
Account account = KeyCloakService.createAccountFromPrincipal(token);
controllerService.addUsersFromCsv(account, file, groupId);
return "redirect:/gruppen2/details/members/" + groupId;
}
}

View File

@ -34,7 +34,6 @@ public class GruppenfindungController {
Model model) {
Account account = KeyCloakService.createAccountFromPrincipal(token);
//TODO: new Contructor/method
User user = new User(account);
model.addAttribute("account", account);