Merge branch 'dev' into TEST-event-tests
This commit is contained in:
5
.github/workflows/gradle.yml
vendored
5
.github/workflows/gradle.yml
vendored
@ -4,13 +4,18 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- dev
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- dev
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'documentation/**'
|
- 'documentation/**'
|
||||||
|
- 'mysql/**'
|
||||||
- 'README.adoc'
|
- 'README.adoc'
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
|
- 'docker-compose.yaml'
|
||||||
|
- '.gitignore'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -117,17 +117,4 @@ public class GroupCreationController {
|
|||||||
|
|
||||||
return "redirect:/gruppen2";
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.context.annotation.SessionScope;
|
import org.springframework.web.context.annotation.SessionScope;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.security.RolesAllowed;
|
import javax.annotation.security.RolesAllowed;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@ -259,4 +260,17 @@ public class GroupDetailsController {
|
|||||||
|
|
||||||
return "redirect:/gruppen2";
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,6 @@ public class GruppenfindungController {
|
|||||||
Model model) {
|
Model model) {
|
||||||
|
|
||||||
Account account = KeyCloakService.createAccountFromPrincipal(token);
|
Account account = KeyCloakService.createAccountFromPrincipal(token);
|
||||||
//TODO: new Contructor/method
|
|
||||||
User user = new User(account);
|
User user = new User(account);
|
||||||
|
|
||||||
model.addAttribute("account", account);
|
model.addAttribute("account", account);
|
||||||
|
|||||||
Reference in New Issue
Block a user