fixes
This commit is contained in:
parent
c4ad442ec3
commit
d8cf7e81b9
3 changed files with 6 additions and 11 deletions
|
@ -165,7 +165,7 @@ tasks.withType(JavaCompile) {
|
|||
dependsOn 'spotlessApply'
|
||||
}
|
||||
compileJava {
|
||||
options.compilerArgs << ' -parameters'
|
||||
options.compilerArgs << '-parameters'
|
||||
}
|
||||
|
||||
task writeVersion {
|
||||
|
|
|
@ -28,7 +28,6 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||
import stirling.software.SPDF.config.security.UserService;
|
||||
import stirling.software.SPDF.model.Role;
|
||||
import stirling.software.SPDF.model.User;
|
||||
import stirling.software.SPDF.model.api.misc.OptimizePdfRequest;
|
||||
import stirling.software.SPDF.model.api.user.UpdateUserDetails;
|
||||
import stirling.software.SPDF.model.api.user.UsernameAndPass;
|
||||
|
||||
|
@ -41,8 +40,7 @@ public class UserController {
|
|||
|
||||
@PreAuthorize("!hasAuthority('ROLE_DEMO_USER')")
|
||||
@PostMapping("/register")
|
||||
public String register(
|
||||
@ModelAttribute UsernameAndPass requestModel, Model model) {
|
||||
public String register(@ModelAttribute UsernameAndPass requestModel, Model model) {
|
||||
if (userService.usernameExists(requestModel.getUsername())) {
|
||||
model.addAttribute("error", "Username already exists");
|
||||
return "register";
|
||||
|
@ -61,10 +59,9 @@ public class UserController {
|
|||
HttpServletResponse response,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
|
||||
|
||||
String currentPassword = requestModel.getPassword();
|
||||
String newPassword = requestModel.getNewPassword();
|
||||
String newUsername = requestModel.getNewUsername();
|
||||
String currentPassword = requestModel.getPassword();
|
||||
String newPassword = requestModel.getNewPassword();
|
||||
String newUsername = requestModel.getNewUsername();
|
||||
|
||||
if (principal == null) {
|
||||
return new RedirectView("/change-creds?messageType=notAuthenticated");
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package stirling.software.SPDF.model.api.user;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
Loading…
Reference in a new issue