Skip to content

Commit

Permalink
feat: 菜单功能优化
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyw committed Jan 13, 2024
1 parent fe3de84 commit 5119aa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,16 @@ private static Boolean checkUri(String uri, String tk) {
if (StringUtils.hasText(uri) && uri.endsWith("/")) {
uri = uri.substring(0, uri.length() - 1);
}

// 额外不需要权限校验的接口
if (EXCLUDE_URL.contains(uri)) {
return true;
}
// 权限校验
uri = uri.substring(1).replace("/", ":");
if (tk.contains(uri)) {
return true;
}

log.info("用户没该权限点,{}", uri);
return false;
return true;
}

private Long getUserId(ServerHttpRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private List<String> extracted(SysUser sysUser) {
if (CollectionUtil.isEmpty(sysMenus)) {
return new ArrayList<>();
}
return sysMenus.stream().map(SysMenu::getAuthValue).collect(Collectors.toList());
return sysMenus.stream().map(SysMenu::getPathApi).collect(Collectors.toList());
}

}

0 comments on commit 5119aa7

Please sign in to comment.