fix for merge
This commit is contained in:
@ -82,7 +82,7 @@ public class Gruppen2Controller {
|
|||||||
@RequestParam(value = "title") String title,
|
@RequestParam(value = "title") String title,
|
||||||
@RequestParam(value = "beschreibung") String beschreibung,
|
@RequestParam(value = "beschreibung") String beschreibung,
|
||||||
@RequestParam(value = "visibility", required = false) Boolean visibility,
|
@RequestParam(value = "visibility", required = false) Boolean visibility,
|
||||||
@RequestParam("file") MultipartFile file) throws IOException {
|
@RequestParam(value = "file") MultipartFile file) throws IOException, EventException {
|
||||||
|
|
||||||
Account account = keyCloakService.createAccountFromPrincipal(token);
|
Account account = keyCloakService.createAccountFromPrincipal(token);
|
||||||
List<User> userList = CsvService.read(file.getInputStream());
|
List<User> userList = CsvService.read(file.getInputStream());
|
||||||
@ -219,10 +219,10 @@ public class Gruppen2Controller {
|
|||||||
@RequestParam (value = "user_id") String user_id) throws EventException {
|
@RequestParam (value = "user_id") String user_id) throws EventException {
|
||||||
controllerService.deleteUser(user_id, group_id);
|
controllerService.deleteUser(user_id, group_id);
|
||||||
return "redirect:/gruppen2/details/members/" + group_id;
|
return "redirect:/gruppen2/details/members/" + group_id;
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("*")
|
@GetMapping("*")
|
||||||
public String defaultLink() {
|
public String defaultLink() {
|
||||||
return "errorRenameLater";
|
return "errorRenameLater";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,12 +7,6 @@ import mops.gruppen2.domain.event.*;
|
|||||||
import mops.gruppen2.security.Account;
|
import mops.gruppen2.security.Account;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import mops.gruppen2.domain.event.*;
|
|
||||||
import mops.gruppen2.security.Account;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@ -25,8 +19,9 @@ public class ControllerService {
|
|||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final InviteLinkRepositoryService inviteLinkRepositoryService;
|
private final InviteLinkRepositoryService inviteLinkRepositoryService;
|
||||||
|
|
||||||
public ControllerService(EventService eventService, InviteLinkRepositoryService inviteLinkRepositoryService) {
|
public ControllerService(EventService eventService, UserService userService, InviteLinkRepositoryService inviteLinkRepositoryService) {
|
||||||
this.eventService = eventService;
|
this.eventService = eventService;
|
||||||
|
this.userService = userService;
|
||||||
this.inviteLinkRepositoryService = inviteLinkRepositoryService;
|
this.inviteLinkRepositoryService = inviteLinkRepositoryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,9 +112,9 @@ public class ControllerService {
|
|||||||
public void deleteGroupEvent(User user, Long group_id) {
|
public void deleteGroupEvent(User user, Long group_id) {
|
||||||
DeleteGroupEvent deleteGroupEvent = new DeleteGroupEvent(group_id, user.getUser_id());
|
DeleteGroupEvent deleteGroupEvent = new DeleteGroupEvent(group_id, user.getUser_id());
|
||||||
eventService.saveEvent(deleteGroupEvent);
|
eventService.saveEvent(deleteGroupEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createLecture(Account account, String title, String description, Boolean visibility, List<User> users) throws EventException {
|
||||||
public void createLecture(Account account, String title, String description, Boolean visibility, List<User> users) {
|
|
||||||
Visibility visibility1;
|
Visibility visibility1;
|
||||||
Long group_id = eventService.checkGroup();
|
Long group_id = eventService.checkGroup();
|
||||||
|
|
||||||
@ -135,7 +130,7 @@ public class ControllerService {
|
|||||||
addUser(account, group_id);
|
addUser(account, group_id);
|
||||||
updateTitle(account, group_id, title);
|
updateTitle(account, group_id, title);
|
||||||
updateDescription(account, group_id, description);
|
updateDescription(account, group_id, description);
|
||||||
updateRole(account, group_id);
|
updateRole(account.getName(), group_id);
|
||||||
addUserList(users, group_id);
|
addUserList(users, group_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,13 +21,11 @@
|
|||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
|
||||||
<!-- Fix double point -->
|
<!-- Fix double point -->
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
<li th:if="${account.getRoles().contains('orga')}">
|
||||||
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
|
|||||||
Reference in New Issue
Block a user