1

add change_maximum size

Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com>
This commit is contained in:
tomvahl
2020-03-23 14:57:33 +01:00
parent 4d77e2905f
commit 7bae5e1184
6 changed files with 87 additions and 17 deletions

View File

@ -40,7 +40,7 @@ public class ControllerService {
* @param title Gruppentitel
* @param description Gruppenbeschreibung
*/
public void createGroup(Account account, String title, String description, Boolean visibility, Long userMaximum, Long parent) throws EventException {
public void createGroup(Account account, String title, String description, Boolean visibility, Boolean maxInfiniteUsers, Long userMaximum, Long parent) throws EventException {
Visibility visibility1;
Long groupId = eventService.checkGroup();
@ -51,6 +51,10 @@ public class ControllerService {
createInviteLink(groupId);
}
if(maxInfiniteUsers){
userMaximum = 100000L;
}
CreateGroupEvent createGroupEvent = new CreateGroupEvent(groupId, account.getName(), parent, GroupType.SIMPLE, visibility1, userMaximum);
eventService.saveEvent(createGroupEvent);
@ -60,7 +64,7 @@ public class ControllerService {
updateRole(account.getName(), groupId);
}
public void createOrga(Account account, String title, String description, Boolean visibility, Boolean lecture, Long userMaximum, Long parent, List<User> users) throws EventException {
public void createOrga(Account account, String title, String description, Boolean visibility, Boolean lecture, Boolean maxInfiniteUsers, Long userMaximum, Long parent, List<User> users) throws EventException {
Visibility visibility1;
Long groupId = eventService.checkGroup();
@ -77,6 +81,11 @@ public class ControllerService {
groupType = GroupType.SIMPLE;
}
if(maxInfiniteUsers){
userMaximum = 100000L;
}
CreateGroupEvent createGroupEvent = new CreateGroupEvent(groupId, account.getName(), parent, groupType, visibility1, userMaximum);
eventService.saveEvent(createGroupEvent);