|
|
@@ -80,7 +80,7 @@ public class UserController extends BaseController {
|
|
|
// @PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/all")
|
|
|
public Page<UserDTO> all(@RequestBody PageQuery pageQuery) {
|
|
|
- if (!SecurityUtils.getAuthenticatedUser().isAdmin()) {
|
|
|
+ if (!(SecurityUtils.getAuthenticatedUser() != null && SecurityUtils.getAuthenticatedUser().isAdmin())) {
|
|
|
pageQuery.getQuery().put("hasRole", "ROLE_MINTER");
|
|
|
}
|
|
|
return userService.toDTO(userService.all(pageQuery));
|