봄 상태변경 권한 admin 추가
This commit is contained in:
@@ -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<String, Object> authParam = new java.util.HashMap<String, Object>();
|
||||
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<String, Object> authParam = new java.util.HashMap<String, Object>();
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user