Skip to content

Commit 1e02749

Browse files
committed
Locked down user modification to admins
1 parent af1a229 commit 1e02749

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/edu/tamu/app/controller/UserController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public ApiResponse getUser(@WeaverUser User user) {
7878
* @throws Exception
7979
*/
8080
@RequestMapping
81-
@PreAuthorize("hasRole('WEB_MANAGER')")
81+
@PreAuthorize("hasRole('ADMIN')")
8282
public ApiResponse allUsers() throws Exception {
8383
return new ApiResponse(SUCCESS, userRepo.findAll());
8484
}
@@ -90,7 +90,7 @@ public ApiResponse allUsers() throws Exception {
9090
* @throws Exception
9191
*/
9292
@RequestMapping("/update")
93-
@PreAuthorize("hasRole('WEB_MANAGER')")
93+
@PreAuthorize("hasRole('ADMIN')")
9494
public ApiResponse updateUser(@RequestBody User user) throws Exception {
9595
user = userRepo.save(user);
9696
simpMessagingTemplate.convertAndSend("/channel/user", new ApiResponse(SUCCESS, userRepo.findAll()));

0 commit comments

Comments
 (0)