From cc50949ca87c4f177f08e55abb16dc8f6430316f Mon Sep 17 00:00:00 2001 From: Bogdan Kostov Date: Wed, 13 Dec 2023 13:01:24 +0100 Subject: [PATCH] [#33] Refactor method name OidcUserController.updateUserInstitution to OidcUserController.updateUser --- src/main/java/cz/cvut/kbss/study/rest/OidcUserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cz/cvut/kbss/study/rest/OidcUserController.java b/src/main/java/cz/cvut/kbss/study/rest/OidcUserController.java index b683333e..8beb728e 100644 --- a/src/main/java/cz/cvut/kbss/study/rest/OidcUserController.java +++ b/src/main/java/cz/cvut/kbss/study/rest/OidcUserController.java @@ -66,7 +66,7 @@ public List getUsers(@RequestParam(value = "institution", required = false @PreAuthorize("hasRole('" + SecurityConstants.ROLE_ADMIN + "') or #username == authentication.name") @PutMapping(value = "/{username}", consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) - public void updateUserInstitution(@PathVariable("username") String username, @RequestBody User user, + public void updateUser(@PathVariable("username") String username, @RequestBody User user, @RequestParam(value = "email", defaultValue = "true") boolean sendEmail) { if (!username.equals(user.getUsername())) { throw new BadRequestException("The passed user's username is different from the specified one.");