upgrade to Spring Boot 4, add webauthn support, some cleanup
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.support;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.controller.support;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.api.security;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.businesslogic.model;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.controller;
|
||||
|
||||
import java.util.Optional;
|
||||
@@ -83,7 +80,7 @@ public class MapManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
public void deleteParteyMap(@PathVariable("id") String id) {
|
||||
public void deleteParteyMap(@PathVariable String id) {
|
||||
parteyMapManager.delete(id);
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.controller;
|
||||
|
||||
import java.time.Instant;
|
||||
@@ -73,7 +70,7 @@ public class UserReportManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
public void deleteParteyUserReport(@PathVariable("id") Long id) {
|
||||
public void deleteParteyUserReport(@PathVariable Long id) {
|
||||
parteyUserReportManager.delete(id);
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.controller;
|
||||
|
||||
import java.util.Optional;
|
||||
@@ -74,7 +71,7 @@ public class UserReportModeratorManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
public void deleteParteyUserReportModerator(@PathVariable("id") Long id) {
|
||||
public void deleteParteyUserReportModerator(@PathVariable Long id) {
|
||||
parteyUserReportModeratorManager.delete(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.controller;
|
||||
|
||||
import java.util.List;
|
||||
@@ -68,7 +65,7 @@ public class UserTagManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping("{username}")
|
||||
public List<ParteyUserTag> getParteyUserTagsForTarget(@PathVariable("username") String username) {
|
||||
public List<ParteyUserTag> getParteyUserTagsForTarget(@PathVariable String username) {
|
||||
User user = userManager.getByUsername(username);
|
||||
|
||||
if (user == null) {
|
||||
@@ -86,7 +83,7 @@ public class UserTagManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping("{username}/active")
|
||||
public List<ParteyUserTag> getNonExpiredParteyUserTagsForTarget(@PathVariable("username") String username) {
|
||||
public List<ParteyUserTag> getNonExpiredParteyUserTagsForTarget(@PathVariable String username) {
|
||||
User user = userManager.getByUsername(username);
|
||||
|
||||
if (user == null) {
|
||||
@@ -104,7 +101,7 @@ public class UserTagManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping("{username}/upcoming")
|
||||
public List<ParteyUserTag> getUpcomingParteyUserTagsForTarget(@PathVariable("username") String username) {
|
||||
public List<ParteyUserTag> getUpcomingParteyUserTagsForTarget(@PathVariable String username) {
|
||||
User user = userManager.getByUsername(username);
|
||||
|
||||
if (user == null) {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.model;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.model;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.businesslogic;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.controller;
|
||||
|
||||
import java.time.Instant;
|
||||
@@ -218,7 +215,7 @@ public class TimeslotController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@DeleteMapping("{id}")
|
||||
public void deleteTimeslot(@PathVariable("id") Long id) {
|
||||
public void deleteTimeslot(@PathVariable Long id) {
|
||||
Timeslot existing = timeslotManager.get(id);
|
||||
if (existing == null || !getCurrentUserId().equals(existing.getOwner())) {
|
||||
throw new EntityResponseStatusException(HttpStatus.FORBIDDEN);
|
||||
|
||||
+1
-4
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.controller;
|
||||
|
||||
import java.time.Instant;
|
||||
@@ -106,7 +103,7 @@ public class TimeslotManagementController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
public void deleteTimeslot(@PathVariable("id") Long id) {
|
||||
public void deleteTimeslot(@PathVariable Long id) {
|
||||
timeslotManager.delete(id);
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.controller.validation;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.model;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.model;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.bstly.we.partey.timeslot.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
Reference in New Issue
Block a user