1

add Usergroups to controller

This commit is contained in:
killerber4t
2020-03-12 15:14:46 +01:00
parent a688235100
commit 9f40df9d59
2 changed files with 5 additions and 3 deletions

View File

@ -81,6 +81,7 @@ public class Gruppen2Controller {
Account account = keyCloakService.createAccountFromPrincipal(token); Account account = keyCloakService.createAccountFromPrincipal(token);
CreateGroupEvent createGroupEvent = new CreateGroupEvent(eventService.checkGroup(), account.getName(), null ,GroupType.LECTURE, Visibility.PUBLIC); CreateGroupEvent createGroupEvent = new CreateGroupEvent(eventService.checkGroup(), account.getName(), null ,GroupType.LECTURE, Visibility.PUBLIC);
AddUserEvent addUserEvent = new AddUserEvent(eventService.checkGroup(), account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail()); AddUserEvent addUserEvent = new AddUserEvent(eventService.checkGroup(), account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail());
eventService.saveEvent(createGroupEvent); eventService.saveEvent(createGroupEvent);
eventService.saveEvent(addUserEvent); eventService.saveEvent(addUserEvent);

View File

@ -28,9 +28,10 @@
<h1>Meine Gruppen</h1> <h1>Meine Gruppen</h1>
<div class="container-fluid"> <div class="container-fluid">
<form action="/" method="get"> <form action="/" method="get">
<div style="border: 10px solid aliceblue; background: aliceblue"> <div th:each="gruppe: ${gruppen}" style="border: 10px solid aliceblue; background: aliceblue">
<h4 style="color: dodgerblue; font-weight: bold">Titel der Gruppe</h4> <ul>
<p>Beschreibung der Gruppe ...</p> <li th:text="${gruppe.getTitle()}"></li>
</ul>
</div> </div>
</form> </form>
</div> </div>