Merge remote-tracking branch 'origin/UI-Improvements'
# Conflicts: # src/main/java/mops/gruppen2/controller/Gruppen2Controller.java # src/main/resources/templates/detailsMember.html
This commit is contained in:
@ -27,10 +27,15 @@ public class ControllerService {
|
||||
* @param title Gruppentitel
|
||||
* @param description Gruppenbeschreibung
|
||||
*/
|
||||
public void createGroup(Account account, String title, String description) {
|
||||
|
||||
public void createGroup(Account account, String title, String description, Boolean visibility) {
|
||||
Visibility visibility1;
|
||||
if (visibility){
|
||||
visibility1 = Visibility.PUBLIC;
|
||||
}else{
|
||||
visibility1 = Visibility.PRIVATE;
|
||||
}
|
||||
List<Event> eventList = new ArrayList<>();
|
||||
Collections.addAll(eventList, new CreateGroupEvent(eventService.checkGroup(), account.getName(), null , GroupType.LECTURE, Visibility.PUBLIC),
|
||||
Collections.addAll(eventList, new CreateGroupEvent(eventService.checkGroup(), account.getName(), null , GroupType.LECTURE, visibility1),
|
||||
new AddUserEvent(eventService.checkGroup(), account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail()),
|
||||
new UpdateRoleEvent(eventService.checkGroup(), account.getName(), Role.ADMIN),
|
||||
new UpdateGroupTitleEvent(eventService.checkGroup(), account.getName(), title),
|
||||
|
||||
Reference in New Issue
Block a user