Skip to content

Commit

Permalink
Merged in feature/SHIBUI-1062 (pull request #279)
Browse files Browse the repository at this point in the history
Feature/SHIBUI-1062

Approved-by: Jonathan Johnson <jj@scaldingspoon.com>
  • Loading branch information
Bill Smith authored and Jonathan Johnson committed Feb 7, 2019
2 parents e836c0d + 9479df3 commit f6ee403
Show file tree
Hide file tree
Showing 38 changed files with 835 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public ResponseEntity<?> getOne(@PathVariable String username) {
return ResponseEntity.ok(findUserOrThrowHttp404(username));
}

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

@PreAuthorize("hasRole('ADMIN')")
@Transactional
@DeleteMapping("/{username}")
Expand Down
3 changes: 3 additions & 0 deletions backend/src/main/resources/i18n/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,14 @@ label.nameid-formats-type=NameID Type
label.select-filter-type=Select Filter Type

label.admin=Admin
label.action-required=Action Required
label.user-access-request=User Access Request
label.user-maintenance=User Maintenance
label.user-id=UserId
label.email=Email
label.role=Role
label.delete=Delete?
label.delete-request=Delete Request

message.delete-user-title=Delete User?
message.delete-user-body=You are requesting to delete a user. If you complete this process the user will be removed. This cannot be undone. Do you wish to continue?
Expand Down
Loading

0 comments on commit f6ee403

Please sign in to comment.