Revert "refactor: 去掉无用代码"

This commit is contained in:
王嘉豪 2022-01-19 19:05:43 +08:00 committed by GitHub
parent 62c8d90558
commit e9cc8e2c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,7 @@ public class DirService {
}
public List<DirItemDTO> query(DirRequest request) {
// CurrentUserDto user = AuthUtils.getUser();
String userId = String.valueOf(AuthUtils.getUser().getUserId());
List<PanelEntity> panelEntities = new ArrayList<>();
if (StringUtils.isNotBlank(request.getName())) {
@ -57,6 +58,17 @@ public class DirService {
return dirItemDTO;
}).collect(Collectors.toList());
return dtos;
// if (user.getUserId() == 1 && StringUtils.equals("admin", user.getUsername())) {
// return dtos;
// }
// List<String> permissions = proxy().permissions();
// return dtos.stream().filter(
// dto -> permissions.stream().anyMatch(
// permission -> StringUtils.equals(permission, dto.getId())
// )
// ).collect(Collectors.toList());
}
public DirService proxy() {