1
0
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:
2023-05-18 17:05:49 +08:00
parent 382bd92f02
commit cb884cc4cd
14 changed files with 194 additions and 38 deletions

View File

@@ -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);