Merge branch 'master' into showInviteLink
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user