1

Merge pull request #88 from hhu-propra2/delete-User

Delete user
This commit is contained in:
XXNitram
2020-03-17 15:00:34 +01:00
committed by GitHub
3 changed files with 0 additions and 4 deletions

View File

@ -133,7 +133,6 @@ public class Gruppen2Controller {
public String pLeaveGroup(KeycloakAuthenticationToken token, @RequestParam (value="group_id") Long id) { public String pLeaveGroup(KeycloakAuthenticationToken token, @RequestParam (value="group_id") Long id) {
Account account = keyCloakService.createAccountFromPrincipal(token); Account account = keyCloakService.createAccountFromPrincipal(token);
controllerService.deleteUser(account, id); controllerService.deleteUser(account, id);
System.out.println(id);
return "redirect:/gruppen2/"; return "redirect:/gruppen2/";
} }
} }

View File

@ -68,7 +68,6 @@ public class ControllerService {
public void deleteUser(Account account, Long group_id){ public void deleteUser(Account account, Long group_id){
DeleteUserEvent deleteUserEvent = new DeleteUserEvent(group_id,account.getName()); DeleteUserEvent deleteUserEvent = new DeleteUserEvent(group_id,account.getName());
System.out.println(deleteUserEvent.getGroup_id() + " " + deleteUserEvent.getUser_id());
eventService.saveEvent(deleteUserEvent); eventService.saveEvent(deleteUserEvent);
} }
} }

View File

@ -30,7 +30,6 @@
<div class="col-9"> <div class="col-9">
<div class="shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue"> <div class="shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue">
<form action="/" method="get">
<h1 style="color: dodgerblue; font-weight: bold" th:text="${group.getTitle()}"></h1> <h1 style="color: dodgerblue; font-weight: bold" th:text="${group.getTitle()}"></h1>
<p style="font-weight: bold"> <p style="font-weight: bold">
<span class="badge badge-pill badge-dark" style="background: darkslategray" th:if="${group.getVisibility() == group.getVisibility().PRIVATE }">Private Gruppe</span> <span class="badge badge-pill badge-dark" style="background: darkslategray" th:if="${group.getVisibility() == group.getVisibility().PRIVATE }">Private Gruppe</span>
@ -45,7 +44,6 @@
</form> </form>
</div> </div>
</div> </div>
</form>
</div> </div>
</div> </div>
<div class="col-3" style="white-space: nowrap"> <div class="col-3" style="white-space: nowrap">