1

Merge branch 'master' into showInviteLink

This commit is contained in:
kasch309
2020-03-24 16:34:06 +01:00
committed by GitHub
10 changed files with 215 additions and 12 deletions

View File

@ -32,14 +32,14 @@ public class AddUserEvent extends Event {
}
@Override
public void applyEvent(Group group) throws EventException {
protected void applyEvent(Group group) throws EventException {
User user = new User(this.userId, this.givenname, this.familyname, this.email);
if (group.getMembers().contains(user)) {
throw new UserAlreadyExistsException(this.getClass().toString());
}
if (group.getMembers().size() == group.getUserMaximum()){
if (group.getMembers().size() == group.getUserMaximum()) {
throw new GroupFullException(this.getClass().toString());
}

View File

@ -28,7 +28,7 @@ public class CreateGroupEvent extends Event {
}
@Override
public void applyEvent(Group group) {
protected void applyEvent(Group group) {
group.setId(this.groupId);
group.setParent(this.groupParent);
group.setType(this.groupType);

View File

@ -15,7 +15,7 @@ public class DeleteGroupEvent extends Event {
}
@Override
public void applyEvent(Group group) {
protected void applyEvent(Group group) {
group.getRoles().clear();
group.getMembers().clear();
group.setTitle(null);

View File

@ -21,7 +21,7 @@ public class DeleteUserEvent extends Event {
}
@Override
public void applyEvent(Group group) throws EventException {
protected void applyEvent(Group group) throws EventException {
for (User user : group.getMembers()) {
if (user.getId().equals(this.userId)) {
group.getMembers().remove(user);

View File

@ -24,7 +24,7 @@ public class UpdateGroupDescriptionEvent extends Event {
}
@Override
public void applyEvent(Group group) {
protected void applyEvent(Group group) {
if (this.newGroupDescription.isEmpty()) {
throw new NoValueException(this.getClass().toString());
}

View File

@ -24,7 +24,7 @@ public class UpdateGroupTitleEvent extends Event {
}
@Override
public void applyEvent(Group group) {
protected void applyEvent(Group group) {
if (this.getNewGroupTitle().isEmpty()) {
throw new NoValueException(this.getClass().toString());
}

View File

@ -25,7 +25,7 @@ public class UpdateRoleEvent extends Event {
}
@Override
public void applyEvent(Group group) throws UserNotFoundException {
protected void applyEvent(Group group) throws UserNotFoundException {
if (group.getRoles().containsKey(this.userId)) {
group.getRoles().put(this.userId, this.newRole);
return;

View File

@ -27,8 +27,10 @@
</div>
</div>
<a style="background-color: #52a1eb; color: white" class="btn btn-lg" href="#"
onclick="window.history.back(-1);return false;" role="button">Zurück</a>
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;">
<a style="color: white" href="#" onclick="window.history.back(-1);return false;" role="button">Zurück</a>
</button>
</div>
</div>
</body>

View File

@ -56,8 +56,8 @@
<th scope="col">Mitgliederanzahl</th>
</tr>
</thead>
<tbody th:each="gruppe : ${gruppen}">
<tr>
<tbody>
<tr th:each="gruppe : ${gruppen}">
<th scope="row">
<a th:href="@{/gruppen2/detailsSearch(id=${gruppe.getId()})}"
th:text="${gruppe.title}">Gruppenname</a>