메뉴 권한 uri 수정

This commit is contained in:
주수현
2025-06-23 16:14:06 +09:00
parent 3809bdca1f
commit 40c59711b5
8 changed files with 92 additions and 27 deletions

View File

@@ -1,5 +1,6 @@
package app.module.admin.config.adapters.web.interceptor;
import app.module.admin.config.application.util.AdminUtil;
import app.module.core.config.adapters.web.interceptor.model.URITopTierVO;
import app.module.core.config.application.enums.AppType;
import app.module.core.config.application.exception.NoMatchingURIException;
@@ -76,16 +77,16 @@ public class AdminURIInterceptor implements HandlerInterceptor {
// 활성 프로파일 가져오기 TODO 2차 오픈시 삭제 예정
modelAndView.addObject("activeProfile", activeProfiles);
String roleId = AdminUtil.getLoginUserRole();
if (!CommonUtil.isAjaxRequest(request)) {
URITopTier topTierOutput = topTierPortIn.connect(AppType.ADMIN);
URITopTier topTierOutput = topTierPortIn.connectRoleId(AppType.ADMIN,roleId);
modelAndView.addObject("topNode", recursiveMapping(topTierOutput));
if (modelAndView.getModelMap().getAttribute("currentURI") == null) {
modelAndView.addObject("currentURI", request.getAttribute("currentURI"));
}
modelAndView.addObject(
"menuHierarchy", uriAncestryPortIn.connect(AppType.ADMIN, request.getRequestURI()));
modelAndView.addObject("menuHierarchy", uriAncestryPortIn.connect(AppType.ADMIN, request.getRequestURI()));
if (cloudFrontDomain != null && bucketFolder != null) {
modelAndView.addObject("S3URL", "https://" + cloudFrontDomain + bucketFolder);

View File

@@ -105,7 +105,7 @@
<!-- 자식 children 가 있는 경우 -->
<th:block th:if="${#lists.size(menu.children) > 0}">
<a th:href="${menu.uri}" th:text="${#messages.msg(menu.id)}">메뉴명</a>
<a href="#" th:text="${#messages.msg(menu.id)}" >메뉴명</a>
<th:block th:insert="~{this :: subMenuFrag}"
th:with="subMenus = ${menu.children}, addSubMenuClass = false">
</th:block>