mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 06:51:23 +08:00
Added back-end permission verification
This commit is contained in:
@@ -6,6 +6,7 @@ import com.cfive.pinnacle.entity.common.ResponseCode;
|
||||
import com.cfive.pinnacle.entity.common.ResponseResult;
|
||||
import com.cfive.pinnacle.service.IUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@PreAuthorize("hasAuthority('system:user:all')")
|
||||
public ResponseResult getAllUser() {
|
||||
List<User> users = userService.getAllUser();
|
||||
return ResponseResult.databaseSelectSuccess(users);
|
||||
|
||||
Reference in New Issue
Block a user