1
Co-authored-by: Christoph <tobi@urpost.de>
This commit is contained in:
Christoph
2020-03-27 14:33:01 +01:00
parent 9ccb7c77a2
commit 63d9b76d40
8 changed files with 14 additions and 11 deletions

View File

@ -296,7 +296,9 @@ public class WebController {
public String postAcceptInvite(KeycloakAuthenticationToken token,
@RequestParam("id") String groupId) {
User user = new User(keyCloakService.createAccountFromPrincipal(token));
Account acc = keyCloakService.createAccountFromPrincipal(token);
User user = new User(acc.getName(), acc.getGivenname(), acc.getFamilyname(), acc.getEmail());
if (!validationService.checkIfUserInGroup(userService.getGroupById(UUID.fromString(groupId)), user)) {
controllerService.addUser(keyCloakService.createAccountFromPrincipal(token), UUID.fromString(groupId));