Skip to content

Commit

Permalink
[SHIBUI-1062]
Browse files Browse the repository at this point in the history
Added permissions check to getUsersWitHRole
  • Loading branch information
Bill Smith committed Jan 25, 2019
1 parent 7a1de10 commit ae1df15
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.annotation.Secured;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
Expand Down Expand Up @@ -60,6 +61,7 @@ public ResponseEntity<?> getOne(@PathVariable String username) {
return ResponseEntity.ok(findUserOrThrowHttp404(username));
}

@Secured("ROLE_ADMIN")
@Transactional
@GetMapping("/role/{rolename}")
public ResponseEntity<?> getUsersWithRole(@PathVariable String rolename) {
Expand Down

0 comments on commit ae1df15

Please sign in to comment.