Skip to content

Commit

Permalink
[SHIBUI-1062]
Browse files Browse the repository at this point in the history
Added /api/admin/users/role/{rolename} to get all users with a specific
role.
  • Loading branch information
Bill Smith committed Jan 18, 2019
1 parent 7eea878 commit 2b6065c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ public ResponseEntity<?> getOne(@PathVariable String username) {
return ResponseEntity.ok(findUserOrThrowHttp404(username));
}

@Transactional
@GetMapping("/role/{rolename}")
public ResponseEntity<?> getUsersWithRole(@PathVariable String rolename) {
return ResponseEntity.ok(userRepository.findByRoles_Name(rolename));
}

@Transactional
@DeleteMapping("/{username}")
public ResponseEntity<?> deleteOne(@PathVariable String username) {
Expand Down

0 comments on commit 2b6065c

Please sign in to comment.