From a058d2c2c785da5bfce17ab55ebb89bebf450e66 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Fri, 21 Nov 2025 09:41:46 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B4=84=20=EC=83=81=ED=83=9C=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EA=B6=8C=ED=95=9C=20admin=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/view/partMng/structureList.jsp | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/WebContent/WEB-INF/view/partMng/structureList.jsp b/WebContent/WEB-INF/view/partMng/structureList.jsp index 1f136a1..cc54f73 100644 --- a/WebContent/WEB-INF/view/partMng/structureList.jsp +++ b/WebContent/WEB-INF/view/partMng/structureList.jsp @@ -4,18 +4,23 @@ <%@ page import="java.util.*" %> <%@include file= "/init.jsp" %> <% -// 권한 체크: AUTHORITY_MASTER의 OBJID가 41000668인 그룹에 속한 사용자인지 확인 +// 권한 체크: AUTHORITY_MASTER의 OBJID가 41000668인 그룹에 속한 사용자 또는 관리자인지 확인 boolean hasStatusChangeAuth = false; try { - org.apache.ibatis.session.SqlSession sqlSession = com.pms.common.SqlMapConfig.getInstance().getSqlSession(); - java.util.Map authParam = new java.util.HashMap(); - authParam.put("userId", connectUserId); - authParam.put("masterObjid", "41000668"); - - Integer authCount = (Integer)sqlSession.selectOne("common.checkUserAuthority", authParam); - hasStatusChangeAuth = (authCount != null && authCount > 0); - - sqlSession.close(); + // 관리자는 자동으로 권한 부여 + if(isAdmin) { + hasStatusChangeAuth = true; + } else { + org.apache.ibatis.session.SqlSession sqlSession = com.pms.common.SqlMapConfig.getInstance().getSqlSession(); + java.util.Map authParam = new java.util.HashMap(); + authParam.put("userId", connectUserId); + authParam.put("masterObjid", "41000668"); + + Integer authCount = (Integer)sqlSession.selectOne("common.checkUserAuthority", authParam); + hasStatusChangeAuth = (authCount != null && authCount > 0); + + sqlSession.close(); + } } catch(Exception e) { e.printStackTrace(); }