feat: 로그인정책관리 추가

main
Jonguk. Lim 12 months ago
parent 1d449780e3
commit 0913b7acb5

@ -0,0 +1,304 @@
/**
*
*/
package egovframework.com.cmm.service.impl;
import java.util.*;
import javax.annotation.*;
import org.apache.ibatis.session.*;
import org.egovframe.rte.psl.dataaccess.*;
import org.slf4j.*;
/**
* EgovComAbstractDAO.java
*
* @author
* @since 2011. 9. 23.
* @version 1.0
* @see
*
* <pre>
* << (Modification Information) >>
*
*
* ------- ------------- ----------------------
* 2011. 9. 23.
* 2016. 5. 11. myBatis
* </pre>
*/
public abstract class EgovComAbstractDAO extends EgovAbstractMapper{
private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
@Resource(name="egov.sqlSession")
public void setSqlSessionFactory(SqlSessionFactory sqlSession) {
super.setSqlSessionFactory(sqlSession);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
*
* @return DBMS insert count
*/
@Override
public int insert(String queryId) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().insert(queryId);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( VO Map)
*
* @return DBMS insert count
*/
@Override
public int insert(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().insert(queryId, parameterObject);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
*
* @return DBMS update count
*/
@Override
public int update(String queryId) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().update(queryId);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping (key ) ( VO Map)
*
* @return DBMS update count
*/
@Override
public int update(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().update(queryId, parameterObject);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
*
* @return DBMS delete count
*/
@Override
public int delete(String queryId) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().delete(queryId);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( key ) ( VO Map)
*
* @return DBMS delete count
*/
@Override
public int delete(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().delete(queryId, parameterObject);
}
//CHECKSTYLE:OFF
/**
* selectOne() .
* @deprecated select()
*
* @see EgovAbstractMapper.selectOne()
*/
//CHECKSTYLE:ON
@Deprecated
public Object selectByPk(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectOne(queryId, parameterObject);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
*
* @return - SQL mapping resultType/resultMap ( VO Map)
*/
@Override
public <T> T selectOne(String queryId) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectOne(queryId);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping (key) ( VO Map)
*
* @return - SQL mapping resultType/resultMap ( VO Map)
*/
@Override
public <T> T selectOne(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectOne(queryId, parameterObject);
}
/**
* Map .
* , .
*
* @param queryId - SQL mapping ID
* @param mapKey -
*
* @return - SQL mapping resultType/resultMap ( VO Map) Map
*/
@Override
public <K, V> Map<K, V> selectMap(String queryId, String mapKey) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectMap(queryId, mapKey);
}
/**
* Map .
* , .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( ) ( VO Map)
* @param mapKey -
*
* @return - SQL mapping resultType/resultMap ( VO Map) Map
*/
@Override
public <K, V> Map<K, V> selectMap(String queryId, Object parameterObject, String mapKey) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectMap(queryId, parameterObject, mapKey);
}
/**
* Map .
* , .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( ) ( VO Map)
* @param mapKey -
* @param rowBounds -
*
* @return - SQL mapping resultType/resultMap ( VO Map) Map
*/
@Override
public <K, V> Map<K, V> selectMap(String queryId, Object parameterObject, String mapKey, RowBounds rowBounds) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectMap(queryId, parameterObject, mapKey, rowBounds);
}
//CHECKSTYLE:OFF
/**
* selectList() .
*
* @see EgovAbstractMapper.selectList()
* @deprecated List<?>
*/
//CHECKSTYLE:ON
@Deprecated
public List<?> list(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectList(queryId, parameterObject);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
*
* @return List - SQL mapping resultType/resultMap ( VO Map) List
*/
@Override
public <E> List<E> selectList(String queryId) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectList(queryId);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( ) ( VO Map)
*
* @return List - SQL mapping resultType/resultMap ( VO Map) List
*/
@Override
public <E> List<E> selectList(String queryId, Object parameterObject) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectList(queryId, parameterObject);
}
/**
* SQL mapping .
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( ) ( VO Map)
* @param rowBounds -
*
* @return List - SQL mapping resultType/resultMap ( VO Map) List
*/
@Override
public <E> List<E> selectList(String queryId, Object parameterObject, RowBounds rowBounds) {
LOGGER.debug("queryId = "+queryId);
return getSqlSession().selectList(queryId, parameterObject, rowBounds);
}
/**
* SQL mapping .
* ( - pageIndex pageSize skipResults, maxResults ibatis )
*
* @param queryId - SQL mapping ID
* @param parameterObject - SQL mapping ( ) ( VO Map)
* @param pageIndex -
* @param pageSize - (pageSize)
*
* @return List - SQL mapping resultType/resultMap ( VO Map) List
*/
@Override
public List<?> listWithPaging(String queryId, Object parameterObject, int pageIndex, int pageSize) {
LOGGER.debug("queryId = "+queryId);
int skipResults = pageIndex * pageSize;
//int maxResults = (pageIndex * pageSize) + pageSize;
RowBounds rowBounds = new RowBounds(skipResults, pageSize);
return getSqlSession().selectList(queryId, parameterObject, rowBounds);
}
/**
* SQL ResultHandler .
* ResultHandler handleResult() .
*
* @param queryId - SQL mapping ID
* @param handler - ResultHandler
* @return
*
* @return List - SQL mapping resultType/resultMap ( VO Map) List
*/
@SuppressWarnings("rawtypes")
@Override
public void listToOutUsingResultHandler(String queryId, ResultHandler handler) {
LOGGER.debug("queryId = "+queryId);
getSqlSession().select(queryId, handler);
}
}

@ -0,0 +1,118 @@
package egovframework.let.uap.filter;
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.slf4j.*;
import org.springframework.context.*;
import org.springframework.web.context.support.*;
import egovframework.com.cmm.*;
import egovframework.let.uap.service.*;
import egovframework.let.utl.sim.service.*;
/**
*
* @author
* @since 2011.07.01
* @version 1.0
* @see
*
* <pre>
* << (Modification Information) >>
*
*
* ------- -------- ---------------------------
* 2011.07.01
* 2017-02-14 (ES) - [CWE-253, CWE-440, CWE-754]
*
* </pre>
*/
public class EgovLoginPolicyFilter implements Filter {
private FilterConfig config;
private static final Logger LOGGER = LoggerFactory.getLogger(EgovLoginPolicyFilter.class);
public void destroy() {
}
/**
* IP
* @param request
* @param response
* @param chain
* @return void
* @exception IOException, ServletException
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
ApplicationContext act = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext());
EgovLoginPolicyService egovLoginPolicyService = (EgovLoginPolicyService) act.getBean("egovLoginPolicyService");
EgovMessageSource egovMessageSource = (EgovMessageSource) act.getBean("egovMessageSource");
HttpServletRequest httpRequest = (HttpServletRequest) request;
String id = request.getParameter("id");
//String password = request.getParameter("password");
String userSe = request.getParameter("userSe");
String userIp = "";
if (id == null || userSe == null) {
((HttpServletResponse) response).sendRedirect(httpRequest.getContextPath() + "/uat/uia/egovLoginUsr.do");
}
// 1. LoginVO를 DB로 부터 가져오는 과정
try {
// 접속IP
userIp = EgovClntInfo.getClntIP((HttpServletRequest) request);
boolean loginPolicyYn = true;
LoginPolicyVO loginPolicyVO = new LoginPolicyVO();
loginPolicyVO.setEmplyrId(id);
loginPolicyVO = egovLoginPolicyService.selectLoginPolicy(loginPolicyVO);
if (loginPolicyVO == null) {
loginPolicyYn = true;
} else {
if (loginPolicyVO.getLmttAt().equals("Y")) {
if (!userIp.equals(loginPolicyVO.getIpInfo())) {
loginPolicyYn = false;
}
}
}
if (loginPolicyYn) {
chain.doFilter(request, response);
} else {
String message = URLEncoder.encode(egovMessageSource.getMessage("fail.common.login.ip"),"UTF-8");
((HttpServletRequest) request).setAttribute("loginMessage", message);
((HttpServletResponse) response).sendRedirect(httpRequest.getContextPath() + "/uat/uia/egovLoginUsr.do?loginMessage="+message);
}
} catch (IOException e) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
LOGGER.error("["+ e.getClass() +"] : ", e.getMessage());
((HttpServletResponse) response).sendRedirect(httpRequest.getContextPath() + "/uat/uia/egovLoginUsr.do?login_error=1");
} catch (Exception e) {
// LOGGER.error("Exception: {}", e.getClass().getName());
// LOGGER.error("Exception Message: {}", e.getMessage());
// 2017-02-14 이정은 시큐어코딩(ES) - 시큐어코딩 부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
LOGGER.error("["+ e.getClass() +"] : ", e.getMessage());
((HttpServletResponse) response).sendRedirect(httpRequest.getContextPath() + "/uat/uia/egovLoginUsr.do?login_error=1");
}
}
public void init(FilterConfig config) throws ServletException {
this.config = config;
}
}

@ -0,0 +1,76 @@
/**
*
* - Service Interface .
*
*
* - , , , , .
* - , .
* @author lee.m.j
* @version 1.0
* @created 03-8-2009 2:08:54
* <pre>
* == (Modification Information) ==
*
*
* ---------- -------- ---------------------------
* 2009.08.03
* 2021.02.18 selectLoginPolicyResult()
* </pre>
*/
package egovframework.let.uap.service;
import java.util.*;
public interface EgovLoginPolicyService {
/**
* .
* @param loginPolicyVO - VO
* @return List -
*/
public List<LoginPolicyVO> selectLoginPolicyList(LoginPolicyVO loginPolicyVO) throws Exception;
/**
* .
* @param loginPolicyVO - VO
* @return int
*/
public int selectLoginPolicyListTotCnt(LoginPolicyVO loginPolicyVO) throws Exception;
/**
* .
* @param loginPolicyVO - VO
* @return LoginPolicyVO - VO
*/
public LoginPolicyVO selectLoginPolicy(LoginPolicyVO loginPolicyVO) throws Exception;
/**
* .
* @param loginPolicy - model
*/
public void insertLoginPolicy(LoginPolicy loginPolicy) throws Exception;
/**
* .
* @param loginPolicy - model
*/
public void updateLoginPolicy(LoginPolicy loginPolicy) throws Exception;
/**
* .
* @param loginPolicy - model
*/
public void deleteLoginPolicy(LoginPolicy loginPolicy) throws Exception;
/**
* .
* @param loginPolicyVO - VO
* @return LoginPolicyVO - VO
*/
/*
* public LoginPolicyVO selectLoginPolicyResult(LoginPolicyVO loginPolicyVO)
* throws Exception;
*/
}

@ -0,0 +1,174 @@
/**
*
* - model .
*
*
* - ID, IP, , .
* @author lee.m.j
* @version 1.0
* @created 03-8-2009 2:08:53
* <pre>
* == (Modification Information) ==
*
*
* ------- -------- ---------------------------
* 2009.8.3
* </pre>
*/
package egovframework.let.uap.service;
import egovframework.com.cmm.*;
public class LoginPolicy extends ComDefaultVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String emplyrId;
/**
*
*/
private String emplyrNm;
/**
*
*/
private String emplyrSe;
/**
* IP
*/
private String ipInfo;
/**
*
*/
private String dplctPermAt;
/**
*
*/
private String lmttAt;
/**
* ID
*/
private String userId;
/**
*
*/
private String regDate;
/**
*
*/
private String regYn;
/**
* @return the emplyrId
*/
public String getEmplyrId() {
return emplyrId;
}
/**
* @param emplyrId the emplyrId to set
*/
public void setEmplyrId(String emplyrId) {
this.emplyrId = emplyrId;
}
/**
* @return the emplyrNm
*/
public String getEmplyrNm() {
return emplyrNm;
}
/**
* @param emplyrNm the emplyrNm to set
*/
public void setEmplyrNm(String emplyrNm) {
this.emplyrNm = emplyrNm;
}
/**
* @return the emplyrSe
*/
public String getEmplyrSe() {
return emplyrSe;
}
/**
* @param emplyrSe the emplyrSe to set
*/
public void setEmplyrSe(String emplyrSe) {
this.emplyrSe = emplyrSe;
}
/**
* @return the ipInfo
*/
public String getIpInfo() {
return ipInfo;
}
/**
* @param ipInfo the ipInfo to set
*/
public void setIpInfo(String ipInfo) {
this.ipInfo = ipInfo;
}
/**
* @return the dplctPermAt
*/
public String getDplctPermAt() {
return dplctPermAt;
}
/**
* @param dplctPermAt the dplctPermAt to set
*/
public void setDplctPermAt(String dplctPermAt) {
this.dplctPermAt = dplctPermAt;
}
/**
* @return the lmttAt
*/
public String getLmttAt() {
return lmttAt;
}
/**
* @param lmttAt the lmttAt to set
*/
public void setLmttAt(String lmttAt) {
this.lmttAt = lmttAt;
}
/**
* @return the userId
*/
public String getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* @return the regDate
*/
public String getRegDate() {
return regDate;
}
/**
* @param regDate the regDate to set
*/
public void setRegDate(String regDate) {
this.regDate = regDate;
}
/**
* @return the regYn
*/
public String getRegYn() {
return regYn;
}
/**
* @param regYn the regYn to set
*/
public void setRegYn(String regYn) {
this.regYn = regYn;
}
}

@ -0,0 +1,64 @@
/**
*
* - VO .
*
*
* - .
* @author lee.m.j
* @version 1.0
* @created 03-8-2009 2:08:55
* <pre>
* == (Modification Information) ==
*
*
* ------- -------- ---------------------------
* 2009.8.3
* </pre>
*/
package egovframework.let.uap.service;
import java.util.*;
public class LoginPolicyVO extends LoginPolicy {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/**
*
*/
List<LoginPolicyVO> loginPolicyList;
/**
*
*/
String [] delYn;
/**
* @return the loginPolicyList
*/
public List<LoginPolicyVO> getLoginPolicyList() {
return loginPolicyList;
}
/**
* @param loginPolicyList the loginPolicyList to set
*/
public void setLoginPolicyList(List<LoginPolicyVO> loginPolicyList) {
this.loginPolicyList = loginPolicyList;
}
/**
* @return the delYn
*/
public String[] getDelYn() {
return delYn;
}
/**
* @param delYn the delYn to set
*/
public void setDelYn(String[] delYn) {
this.delYn = delYn;
}
}

@ -0,0 +1,99 @@
/**
*
* - ServiceImpl .
*
*
* - , , , , .
* - , .
* @author lee.m.j
* @version 1.0
* @created 03-8-2009 2:08:54
* <pre>
* == (Modification Information) ==
*
*
* ---------- -------- ---------------------------
* 2009.08.03
* 2021.02.18 selectLoginPolicyResult()
* </pre>
*/
package egovframework.let.uap.service.impl;
import java.util.*;
import javax.annotation.*;
import org.egovframe.rte.fdl.cmmn.*;
import org.springframework.stereotype.*;
import egovframework.let.uap.service.*;
@Service("egovLoginPolicyService")
public class EgovLoginPolicyServiceImpl extends EgovAbstractServiceImpl implements EgovLoginPolicyService {
@Resource(name="loginPolicyDAO")
LoginPolicyDAO loginPolicyDAO;
/**
* .
* @param loginPolicyVO - VO
* @return List -
*/
public List<LoginPolicyVO> selectLoginPolicyList(LoginPolicyVO loginPolicyVO) throws Exception {
return loginPolicyDAO.selectLoginPolicyList(loginPolicyVO);
}
/**
* .
* @param loginPolicyVO - VO
* @return int
*/
public int selectLoginPolicyListTotCnt(LoginPolicyVO loginPolicyVO) throws Exception {
return loginPolicyDAO.selectLoginPolicyListTotCnt(loginPolicyVO);
}
/**
* .
* @param loginPolicyVO - VO
* @return LoginPolicyVO - VO
*/
public LoginPolicyVO selectLoginPolicy(LoginPolicyVO loginPolicyVO) throws Exception {
return loginPolicyDAO.selectLoginPolicy(loginPolicyVO);
}
/**
* .
* @param loginPolicy - model
*/
public void insertLoginPolicy(LoginPolicy loginPolicy) throws Exception {
loginPolicyDAO.insertLoginPolicy(loginPolicy);
}
/**
* .
* @param loginPolicy - model
*/
public void updateLoginPolicy(LoginPolicy loginPolicy) throws Exception {
loginPolicyDAO.updateLoginPolicy(loginPolicy);
}
/**
* .
* @param loginPolicy - model
*/
public void deleteLoginPolicy(LoginPolicy loginPolicy) throws Exception {
loginPolicyDAO.deleteLoginPolicy(loginPolicy);
}
/**
* .
* @param loginPolicyVO - VO
* @return LoginPolicyVO - VO
*/
/*
* public LoginPolicyVO selectLoginPolicyResult(LoginPolicyVO loginPolicyVO)
* throws Exception { return
* loginPolicyDAO.selectLoginPolicyResult(loginPolicyVO); }
*/
}

@ -0,0 +1,84 @@
/**
*
* - DAO .
*
*
* - , , , , .
* - , .
* @author lee.m.j
* @version 1.0
* @created 03-8-2009 2:08:54
* <pre>
* == (Modification Information) ==
*
*
* ---------- -------- ---------------------------
* 2009.08.03
* 2021.02.18 selectLoginPolicyResult()
* </pre>
*/
package egovframework.let.uap.service.impl;
import java.util.*;
import org.springframework.stereotype.*;
import egovframework.com.cmm.service.impl.*;
import egovframework.let.uap.service.*;
@Repository("loginPolicyDAO")
public class LoginPolicyDAO extends EgovComAbstractDAO {
/**
* .
* @param loginPolicyVO - VO
* @return List -
*/
public List<LoginPolicyVO> selectLoginPolicyList(LoginPolicyVO loginPolicyVO) throws Exception {
return selectList("loginPolicyDAO.selectLoginPolicyList", loginPolicyVO);
}
/**
* .
* @param loginPolicyVO - VO
* @return int
*/
public int selectLoginPolicyListTotCnt(LoginPolicyVO loginPolicyVO) throws Exception {
return (Integer)selectOne("loginPolicyDAO.selectLoginPolicyListTotCnt", loginPolicyVO);
}
/**
* .
* @param loginPolicyVO - VO
* @return LoginPolicyVO - VO
*/
public LoginPolicyVO selectLoginPolicy(LoginPolicyVO loginPolicyVO) throws Exception {
return (LoginPolicyVO)selectOne("loginPolicyDAO.selectLoginPolicy", loginPolicyVO);
}
/**
* .
* @param loginPolicy - model
*/
public void insertLoginPolicy(LoginPolicy loginPolicy) throws Exception {
insert("loginPolicyDAO.insertLoginPolicy", loginPolicy);
}
/**
* .
* @param loginPolicy - model
*/
public void updateLoginPolicy(LoginPolicy loginPolicy) throws Exception {
update("loginPolicyDAO.updateLoginPolicy", loginPolicy);
}
/**
* .
* @param loginPolicy - model
*/
public void deleteLoginPolicy(LoginPolicy loginPolicy) throws Exception {
delete("loginPolicyDAO.deleteLoginPolicy", loginPolicy);
}
}

@ -0,0 +1,204 @@
/**
*
* - controller .
*
*
* - , , , , .
* - , .
* @author lee.m.j
* @version 1.0
* @created 03-8-2009 2:08:53
* <pre>
* == (Modification Information) ==
*
*
* ------- -------- ---------------------------
* 2009.8.3
* 2011.8.26 IncludedInfo annotation
* </pre>
*/
package egovframework.let.uap.web;
import javax.annotation.*;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.stereotype.*;
import org.springframework.ui.*;
import org.springframework.validation.*;
import org.springframework.web.bind.annotation.*;
import org.springmodules.validation.commons.*;
import egovframework.com.cmm.*;
import egovframework.com.cmm.annotation.*;
import egovframework.com.cmm.util.*;
import egovframework.let.uap.service.*;
import egovframework.let.utl.fcc.service.*;
@Controller
public class EgovLoginPolicyController {
@Resource(name="egovMessageSource")
EgovMessageSource egovMessageSource;
@Resource(name="egovLoginPolicyService")
EgovLoginPolicyService egovLoginPolicyService;
@Autowired
private DefaultBeanValidator beanValidator;
/**
* .
* @return String - Url
*/
@RequestMapping("/uat/uap/selectLoginPolicyListView.do")
public String selectLoginPolicyListView() throws Exception {
return "egovframework/com/uat/uap/EgovLoginPolicyList";
}
/**
* .
* @param loginPolicyVO - VO
* @return String - Url
*/
@IncludedInfo(name="로그인정책관리", order = 30 ,gid = 10)
@RequestMapping("/uat/uap/selectLoginPolicyList.do")
public String selectLoginPolicyList(@ModelAttribute("loginPolicyVO") LoginPolicyVO loginPolicyVO,
ModelMap model) throws Exception {
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(loginPolicyVO.getPageIndex());
paginationInfo.setRecordCountPerPage(loginPolicyVO.getPageUnit());
paginationInfo.setPageSize(loginPolicyVO.getPageSize());
loginPolicyVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
loginPolicyVO.setLastIndex(paginationInfo.getLastRecordIndex());
loginPolicyVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
loginPolicyVO.setLoginPolicyList(egovLoginPolicyService.selectLoginPolicyList(loginPolicyVO));
model.addAttribute("loginPolicyList", loginPolicyVO.getLoginPolicyList());
int totCnt = egovLoginPolicyService.selectLoginPolicyListTotCnt(loginPolicyVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
return "egovframework/com/uat/uap/EgovLoginPolicyList";
}
/**
* .
* @param loginPolicyVO - VO
* @return String - Url
*/
@RequestMapping("/uat/uap/getLoginPolicy.do")
public String selectLoginPolicy(@RequestParam("emplyrId") String emplyrId,
@ModelAttribute("loginPolicyVO") LoginPolicyVO loginPolicyVO,
ModelMap model) throws Exception {
loginPolicyVO.setEmplyrId(emplyrId);
model.addAttribute("loginPolicy", egovLoginPolicyService.selectLoginPolicy(loginPolicyVO));
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
LoginPolicyVO vo = (LoginPolicyVO)model.get("loginPolicy");
if(vo.getRegYn().equals("N"))
return "egovframework/com/uat/uap/EgovLoginPolicyRegist";
else
return "egovframework/com/uat/uap/EgovLoginPolicyUpdt";
}
/**
* .
* @param loginPolicy - model
* @return String - Url
*/
@RequestMapping("/uat/uap/addLoginPolicyView.do")
public String insertLoginPolicyView(@RequestParam("emplyrId") String emplyrId,
@ModelAttribute("loginPolicyVO") LoginPolicyVO loginPolicyVO,
ModelMap model) throws Exception {
loginPolicyVO.setEmplyrId(emplyrId);
model.addAttribute("loginPolicy", egovLoginPolicyService.selectLoginPolicy(loginPolicyVO));
model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));
return "egovframework/com/uat/uap/EgovLoginPolicyRegist";
}
/**
* .
* @param loginPolicy - model
* @return String - Url
*/
@RequestMapping("/uat/uap/addLoginPolicy.do")
public String insertLoginPolicy(@ModelAttribute("loginPolicy") LoginPolicy loginPolicy,
BindingResult bindingResult,
ModelMap model) throws Exception {
beanValidator.validate(loginPolicy, bindingResult); //validation 수행
if (bindingResult.hasErrors()) {
model.addAttribute("loginPolicyVO", loginPolicy);
return "egovframework/com/uat/uap/EgovLoginPolicyRegist";
} else {
LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
loginPolicy.setUserId(user == null ? "" : EgovStringUtil.isNullToString(user.getId()));
egovLoginPolicyService.insertLoginPolicy(loginPolicy);
model.addAttribute("message", egovMessageSource.getMessage("success.common.update"));
return "forward:/uat/uap/getLoginPolicy.do";
}
}
/**
* .
* @param loginPolicy - model
* @return String - Url
*/
@RequestMapping("/uat/uap/updtLoginPolicy.do")
public String updateLoginPolicy(@ModelAttribute("loginPolicy") LoginPolicy loginPolicy,
BindingResult bindingResult,
ModelMap model) throws Exception {
beanValidator.validate(loginPolicy, bindingResult); //validation 수행
if (bindingResult.hasErrors()) {
model.addAttribute("loginPolicyVO", loginPolicy);
return "egovframework/com/uat/uap/EgovLoginPolicyUpdt";
} else {
LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
loginPolicy.setUserId(user == null ? "" : EgovStringUtil.isNullToString(user.getId()));
egovLoginPolicyService.updateLoginPolicy(loginPolicy);
model.addAttribute("message", egovMessageSource.getMessage("success.common.update"));
return "forward:/uat/uap/selectLoginPolicyList.do";
}
}
/**
* .
* @param loginPolicy - model
* @return String - Url
*/
@RequestMapping("/uat/uap/removeLoginPolicy.do")
public String deleteLoginPolicy(@ModelAttribute("loginPolicy") LoginPolicy loginPolicy,
ModelMap model) throws Exception {
egovLoginPolicyService.deleteLoginPolicy(loginPolicy);
model.addAttribute("message", egovMessageSource.getMessage("success.common.delete"));
return "forward:/uat/uap/selectLoginPolicyList.do";
}
}

@ -0,0 +1,269 @@
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ page import="egovframework.com.cmm.LoginVO" %>
<%@ page import="egovframework.com.cmm.util.EgovUserDetailsHelper" %>
<%
/**
* @Class Name : EgovLoginPolicyList.java
* @Description : EgovLoginPolicyList jsp
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ --------- -------- ---------------------------
* @ 2009.02.01 lee.m.j 최초 생성
* @ 2011.09.30 이기하 데이터 없을시 메시지 추가
* @ 2018.09.03 신용호 공통컴포넌트 3.8 개선
*
* @author lee.m.j
* @since 2009.03.21
* @version 1.0
* @see
*
* Copyright (C) 2009 by MOPAS All right reserved.
*/
%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><spring:message code="comUatUap.LoginPolicyList.title" /></title><!-- 로그인정책 목록조회 -->
<link href="<c:url value='/css/egovframework/com/com.css' />" rel="stylesheet" type="text/css">
<link href="<c:url value='/css/egovframework/com/button.css' />" rel="stylesheet" type="text/css">
<script type="text/javaScript" language="javascript" defer="defer">
<!--
function fncCheckAll() {
var checkField = document.listForm.delYn;
if(document.listForm.checkAll.checked) {
if(checkField) {
if(checkField.length > 1) {
for(var i=0; i < checkField.length; i++) {
checkField[i].checked = true;
}
} else {
checkField.checked = true;
}
}
} else {
if(checkField) {
if(checkField.length > 1) {
for(var j=0; j < checkField.length; j++) {
checkField[j].checked = false;
}
} else {
checkField.checked = false;
}
}
}
}
function fncManageChecked() {
var checkField = document.listForm.delYn;
var checkId = document.listForm.checkId;
var returnValue = "";
var returnBoolean = false;
var checkCount = 0;
if(checkField) {
if(checkField.length > 1) {
for(var i=0; i<checkField.length; i++) {
if(checkField[i].checked) {
checkCount++;
checkField[i].value = checkId[i].value;
if(returnValue == "")
returnValue = checkField[i].value;
else
returnValue = returnValue + ";" + checkField[i].value;
}
}
if(checkCount > 0)
returnBoolean = true;
else {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkCount"/>");//선택된 로그인정책이 없습니다.
returnBoolean = false;
}
} else {
if(document.listForm.delYn.checked == false) {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkCount"/>");//선택된 로그인정책이 없습니다.
returnBoolean = false;
}
else {
returnValue = checkId.value;
returnBoolean = true;
}
}
} else {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkField"/>");//조회된 결과가 없습니다.
}
document.listForm.emplyrIds.value = returnValue;
return returnBoolean;
}
function fncSelectLoginPolicyList(pageNo){
document.listForm.searchCondition.value = "1";
document.listForm.pageIndex.value = pageNo;
document.listForm.action = "<c:url value='/uat/uap/selectLoginPolicyList.do'/>";
document.listForm.submit();
}
function fncSelectLoginPolicy(emplyrId) {
document.listForm.emplyrId.value = emplyrId;
document.listForm.action = "<c:url value='/uat/uap/getLoginPolicy.do'/>";
document.listForm.submit();
}
function fncInsertCheckId() {
var checkedCounter = 0;
var checkIds = document.listForm.delYn;
var checkIdv = document.listForm.checkId;
var checkReg = document.listForm.regYn;
if(checkIds == null) {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkIds"/>");//조회 후 등록하시기 바랍니다.
return;
}
else {
for(var i=0; i<checkIds.length; i++) {
if(checkIds[i].checked) {
if(checkReg[i].value == 'Y' ) {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkReg"/>");//이미 로그인정책이 등록되어 있습니다.
return;
}
checkedCounter++;
document.listForm.emplyrId.value = checkIdv[i].value;
}
}
if(checkedCounter > 1) {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkedCounter.onlyOne"/>");//등록대상 하나만 선택하십시오.
return false;
} else if(checkedCounter < 1) {
alert("<spring:message code="comUatUap.LoginPolicyList.validate.checkedCounter.none"/>");//선택된 등록대상이 없습니다.
return false;
}
return true;
}
}
function fncAddLoginPolicyInsert() {
if(fncInsertCheckId()) {
document.listForm.action = "<c:url value='/uat/uap/addLoginPolicyView.do'/>";
document.listForm.submit();
}
}
function fncLoginPolicyListDelete() {
if(fncManageChecked()) {
if(confirm("<spring:message code="comUatUap.LoginPolicyList.validate.delete"/>")) {//삭제하시겠습니까?
document.listForm.action = "<c:url value='/uat/uap/removeLoginPolicyList.do'/>";
document.listForm.submit();
}
}
}
function linkPage(pageNo){
document.listForm.searchCondition.value = "1";
document.listForm.pageIndex.value = pageNo;
document.listForm.action = "<c:url value='/uat/uap/selectLoginPolicyList.do'/>";
document.listForm.submit();
}
function press() {
if (event.keyCode==13) {
fncSelectLoginPolicyList('1');
}
}
-->
</script>
</head>
<body>
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<div class="board">
<h1><spring:message code="comUatUap.LoginPolicyList.caption" /></h1>
<div class="search_box" title="<spring:message code="common.searchCondition.msg" />">
<form name="listForm" action="<c:url value='/uat/uap/selectLoginPolicyList.do'/>" method="post">
<ul>
<li>
<label for=""><spring:message code="comUatUap.LoginPolicyList.userName" /> : </label><!-- 사용자 명 -->
<input class="s_input2 vat" name="searchKeyword" type="text" value="<c:out value="${loginPolicyVO.searchKeyword}"/>" size="25" onkeypress="press();" title="<spring:message code="comUatUap.LoginPolicyList.userNameSearch" />" /><!-- 사용자명검색 -->
<input class="s_btn" type="submit" value="<spring:message code="button.inquire" />" title="<spring:message code="title.inquire"/>" onclick="fncSelectLoginPolicyList('1'); return false;" /><!-- 조회 -->
</li>
</ul>
<input type="hidden" name="emplyrId">
<input type="hidden" name="pageIndex" value="<c:if test="${empty loginPolicyVO.pageIndex }">1</c:if><c:if test="${!empty loginPolicyVO.pageIndex }"><c:out value='${loginPolicyVO.pageIndex}'/></c:if>">
<input type="hidden" name="searchCondition" value="1" >
</form>
</div>
<table class="board_list">
<caption><spring:message code="comUatUap.LoginPolicyList.caption" /></caption><!-- 로그인정책 관리 -->
<colgroup>
<col style="width:20%" />
<col style="width:25%" />
<col style="width:20%" />
<col style="width:15%" />
</colgroup>
<thead>
<tr>
<th scope="col"><spring:message code="comUatUap.LoginPolicyList.userId"/></th><!-- 사용자 ID -->
<th scope="col"><spring:message code="comUatUap.LoginPolicyList.userName" /></th><!-- 사용자 명 -->
<th scope="col"><spring:message code="comUatUap.LoginPolicyList.ipInfo" /></th><!-- IP 정보 -->
<th scope="col"><spring:message code="comUatUap.LoginPolicyList.restricted" /></th><!-- 제한여부 -->
</tr>
</thead>
<tbody>
<%-- 데이터를 없을때 화면에 메세지를 출력해준다 --%>
<c:if test="${fn:length(loginPolicyList) == 0}">
<tr>
<td colspan="4">
<spring:message code="common.nodata.msg" />
</td>
</tr>
</c:if>
<c:forEach var="loginPolicy" items="${loginPolicyList}" varStatus="status">
<tr>
<td>
<form name="item" action="<c:url value='/uat/uap/getLoginPolicy.do'/>">
<input type="hidden" name="emplyrId" value="<c:out value="${loginPolicy.emplyrId}"/>">
<input type="hidden" name="pageIndex" value="<c:out value='${loginPolicyVO.pageIndex}'/>">
<input type="hidden" name="searchCondition" value="<c:out value='${loginPolicyVO.searchCondition}'/>">
<input type="hidden" name="searchKeyword" value="<c:out value="${loginPolicyVO.searchKeyword}"/>">
<span class="link ac"><input type="submit" value="<c:out value="${loginPolicy.emplyrId}"/>" onclick="fncSelectLoginPolicy('<c:out value="${loginPolicy.emplyrId}"/>'); return false;"></span>
</form>
</td>
<td><c:out value="${loginPolicy.emplyrNm}"/></td>
<td><c:out value="${loginPolicy.ipInfo}"/></td>
<td><c:if test="${loginPolicy.lmttAt == 'Y'}">Y</c:if><c:if test="${loginPolicy.lmttAt == 'N'}">N</c:if></td>
</tr>
</c:forEach>
</tbody>
</table>
<!-- paging navigation -->
<c:if test="${!empty loginPolicyVO.pageIndex }">
<div class="pagination">
<ul>
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="linkPage"/>
</ul>
</div>
</c:if>
</div>
</body>
</html>

@ -0,0 +1,169 @@
<%--
/**
* @Class Name : EgovLoginPolicyRegist.java
* @Description : EgovLoginPolicyRegist jsp
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2009.02.01 lee.m.j 최초 생성
* @ 2018.09.03 신용호 공통컴포넌트 3.8 개선
*
* @author lee.m.j
* @since 2009.03.11
* @version 1.0
* @see
*
* Copyright (C) 2009 by MOPAS All right reserved.
*/
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<c:url value='/css/egovframework/com/com.css' />" rel="stylesheet" type="text/css">
<link href="<c:url value='/css/egovframework/com/button.css' />" rel="stylesheet" type="text/css">
<title><spring:message code="comUatUap.loginPolicyRegist.title"/></title><!-- 로그인정책 등록 -->
<%-- <script type="text/javascript" src="<c:url value='/js/egovframework/com/cmm/fms/EgovMultiFile.js'/>" ></script> --%>
<script type="text/javascript" src="<c:url value='/js/egovframework/com/cmm/fms/EgovMultiFiles.js'/>" ></script>
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<validator:javascript formName="loginPolicy" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript" language="javascript">
function fncSelectLoginPolicyList() {
var varFrom = document.getElementById("loginPolicy");
varFrom.action = "<c:url value='/uat/uap/selectLoginPolicyList.do'/>";
varFrom.submit();
}
function fncLoginPolicyInsert() {
var varFrom = document.getElementById("loginPolicy");
varFrom.action = "<c:url value='/uat/uap/addLoginPolicy.do'/>";
if(confirm("<spring:message code="comUatUap.loginPolicyRegist.validate.confirm.save"/>")){ //저장 하시겠습니까?
if(!validateLoginPolicy(varFrom)){
return;
}else{
if(ipValidate())
varFrom.submit();
else
return;
}
}
}
function ipValidate() {
var varFrom = document.getElementById("loginPolicy");
var IPvalue = varFrom.ipInfo.value;
var ipPattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipPattern);
var result = "";
var thisSegment;
if(IPvalue == "0.0.0.0") {
alert(IPvalue + " : <spring:message code="comUatUap.loginPolicyRegist.validate.info.exceptionIP"/>"); //예외 아이피 입니다.
result = false;
} else if (IPvalue == "255.255.255.255") {
alert(result =IPvalue + " : <spring:message code="comUatUap.loginPolicyRegist.validate.info.exceptionIP"/>"); //예외 아이피 입니다.
result = false;
} else {
result = true;
}
if(ipArray == null) {
alert("<spring:message code="comUatUap.loginPolicyRegist.validate.info.invalidForm"/>"); //형식이 일치 하지않습니다.
result = false;
} else {
for (var i=1; i<5; i++) {
thisSegment = ipArray[i];
if (thisSegment > 255) {
alert("<spring:message code="comUatUap.loginPolicyRegist.validate.info.invalidForm"/>"); //형식이 일치 하지않습니다.
result = false;
}
if ((i == 0) && (thisSegment > 255)) {
alert("<spring:message code="comUatUap.loginPolicyRegist.validate.info.invalidForm"/>"); //형식이 일치 하지않습니다.
result = false;
}
}
}
return result;
}
</script>
</head>
<body>
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript><!-- 자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다. -->
<div class="wTableFrm">
<!-- 타이틀 -->
<h2><spring:message code="comUatUap.loginPolicyRegist.pageTop.title"/></h2><!-- 로그인정책 등록 -->
<form:form modelAttribute="loginPolicy" method="post" action="${pageContext.request.contextPath}/uat/uap/addLoginPolicy.do' />">
<!-- 등록폼 -->
<table class="wTable">
<colgroup>
<col style="width:16%" />
<col style="" />
</colgroup>
<tr>
<th><spring:message code="comUatUap.loginPolicyRegist.emplyrId"/> <span class="pilsu">*</span></th><!-- 사용자ID -->
<td class="left">
<input id="emplyrId" name="emplyrId" type="text" value="<c:out value='${loginPolicy.emplyrId}'/>" title="<spring:message code="comUatUap.loginPolicyRegist.emplyrId"/>" size="30" maxlength="30" readonly="readonly" /><!-- 사용자ID -->
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyRegist.emplyrNm"/> <span class="pilsu">*</span></th><!-- 사용자명 -->
<td class="left">
<input id="emplyrNm" type="text" name="emplyrNm" value="<c:out value='${loginPolicy.emplyrNm}'/>" title="<spring:message code="comUatUap.loginPolicyRegist.emplyrNm"/>" size="30" maxlength="50" readonly="readonly" /><!-- 사용자명 -->
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyRegist.ipInfo"/> <span class="pilsu">*</span></th><!-- IP정보 -->
<td class="left">
<input id="ipInfo" type="text" name="ipInfo" title="<spring:message code="comUatUap.loginPolicyRegist.ipInfo"/>" size="30" maxLength="23" />&nbsp;<form:errors path="ipInfo" /><!-- IP정보 -->
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyRegist.lmttAt"/> <span class="pilsu">*</span></th><!-- IP제한여부 -->
<td class="left">
<select name="lmttAt" id="lmttAt" title="<spring:message code="comUatUap.loginPolicyRegist.lmttAt"/>"><!-- IP제한여부 -->
<option value="Y">Y</option>
<option value="N">N</option>
</select>&nbsp;<form:errors path="lmttAt" />
</td>
</tr>
</table>
<!-- 하단 버튼 -->
<div class="btn">
<input class="s_submit" type="submit" value="<spring:message code="button.save" />" onclick="fncLoginPolicyInsert(); return false;" /><!-- 저장 -->
<span class="btn_s"><a href="<c:url value='/uat/uap/selectLoginPolicyList.do'/>?pageIndex=<c:out value='${loginPolicyVO.pageIndex}'/>&amp;searchKeyword=<c:out value="${loginPolicyVO.searchKeyword}"/>&amp;searchCondition=1" onclick="fncSelectLoginPolicyList(); return false;"><spring:message code="button.list" /></a></span><!-- 목록 -->
</div>
<div style="clear:both;"></div>
<input type="hidden" name="dplctPermAt" value="Y" >
<input type="hidden" name="searchCondition" value="<c:out value='${loginPolicyVO.searchCondition}'/>" >
<input type="hidden" name="searchKeyword" value="<c:out value='${loginPolicyVO.searchKeyword}'/>" >
<input type="hidden" name="pageIndex" value="<c:out value='${loginPolicyVO.pageIndex}'/>" >
</form:form>
</div>
</body>
</html>

@ -0,0 +1,187 @@
<!DOCTYPE html>
<%--
/**
* @Class Name : EgovLoginPolicyUpdt.java
* @Description : EgovLoginPolicyUpdt jsp
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2009.02.01 lee.m.j 최초 생성
* @ 2018.09.03 신용호 공통컴포넌트 3.8 개선
*
* @author lee.m.j
* @since 2009.03.11
* @version 1.0
* @see
*
* Copyright (C) 2009 by MOPAS All right reserved.
*/
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><spring:message code="comUatUap.loginPolicyUpdt.title"/></title><!-- 로그인정책 수정 -->
<link href="<c:url value="/css/egovframework/com/com.css"/>" rel="stylesheet" type="text/css">
<link href="<c:url value="/css/egovframework/com/button.css"/>" rel="stylesheet" type="text/css">
<%-- <script type="text/javascript" src="<c:url value='/js/egovframework/com/cmm/fms/EgovMultiFile.js'/>" ></script> --%>
<script type="text/javascript" src="<c:url value='/js/egovframework/com/cmm/fms/EgovMultiFiles.js'/>" ></script>
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<validator:javascript formName="loginPolicy" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript" language="javascript" defer="defer">
<!--
function fncSelectLoginPolicyList() {
var varFrom = document.getElementById("loginPolicy");
varFrom.action = "<c:url value='/uat/uap/selectLoginPolicyList.do'/>";
varFrom.submit();
}
function fncLoginPolicyUpdate() {
var varFrom = document.getElementById("loginPolicy");
varFrom.action = "<c:url value='/uat/uap/updtLoginPolicy.do'/>";
if(confirm("<spring:message code="comUatUap.loginPolicyUpdt.validate.confirm.save"/>")){ //저장 하시겠습니까?
if(!validateLoginPolicy(varFrom)){
return;
}else{
if(ipValidate())
varFrom.submit();
else
return;
}
}
}
function fncLoginPolicyDelete() {
var varFrom = document.getElementById("loginPolicy");
varFrom.action = "<c:url value='/uat/uap/removeLoginPolicy.do'/>";
if(confirm("<spring:message code="comUatUap.loginPolicyUpdt.validate.confirm.delete"/>")){ //삭제 하시겠습니까?
varFrom.submit();
}
}
function ipValidate() {
var varFrom = document.getElementById("loginPolicy");
var IPvalue = varFrom.ipInfo.value;
var ipPattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipPattern);
var result = "";
var thisSegment;
if(IPvalue == "0.0.0.0") {
alert(IPvalue + " : <spring:message code="comUatUap.loginPolicyUpdt.validate.info.exceptionIP"/>"); //예외 아이피 입니다.
result = false;
} else if (IPvalue == "255.255.255.255") {
alert(result =IPvalue + " : <spring:message code="comUatUap.loginPolicyUpdt.validate.info.exceptionIP"/>"); //예외 아이피 입니다.
result = false;
} else {
result = true;
}
if(ipArray == null) {
alert("<spring:message code="comUatUap.loginPolicyUpdt.validate.info.invalidForm"/>"); //형식이 일치 하지않습니다.
result = false;
} else {
for (var i=1; i<5; i++) {
thisSegment = ipArray[i];
if (thisSegment > 255) {
alert("<spring:message code="comUatUap.loginPolicyUpdt.validate.info.invalidForm"/>"); //형식이 일치 하지않습니다.
result = false;
}
if ((i == 0) && (thisSegment > 255)) {
alert("<spring:message code="comUatUap.loginPolicyUpdt.validate.info.invalidForm"/>"); //형식이 일치 하지않습니다.
result = false;
}
}
}
return result;
}
-->
</script>
</head>
<body>
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript><!-- 자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다. -->
<form:form modelAttribute="loginPolicy" method="post" action="${pageContext.request.contextPath}/uat/uap/updtLoginPolicy.do' />">
<div class="wTableFrm">
<!-- 타이틀 -->
<h2><spring:message code="comUatUap.loginPolicyUpdt.pageTop.title"/></h2><!-- 로그인정책 수정 -->
<!-- 등록폼 -->
<table class="wTable">
<colgroup>
<col style="width:16%" />
<col style="" />
</colgroup>
<tr>
<th><spring:message code="comUatUap.loginPolicyUpdt.emplyrId"/> <span class="pilsu">*</span></th><!-- 사용자ID -->
<td class="left">
<input name="emplyrId" id="emplyrId" title="<spring:message code="comUatUap.loginPolicyUpdt.emplyrId"/>" type="text" <c:if test="${registerFlag == 'UPDATE'}">readonly</c:if> value="<c:out value='${loginPolicy.emplyrId}'/>" readonly="readonly" style="width:180px" />
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyUpdt.emplyrNm"/> <span class="pilsu">*</span></th><!-- 사용자명 -->
<td class="left">
<input name="emplyrNm" id="emplyrNm" title="<spring:message code="comUatUap.loginPolicyUpdt.emplyrNm"/>" type="text" value="<c:out value='${loginPolicy.emplyrNm}'/>" maxLength="50" readonly="readonly" style="width:180px" /><!-- 사용자명 -->
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyUpdt.ipInfo"/> <span class="pilsu">*</span></th><!-- IP정보 -->
<td class="left">
<input name="ipInfo" id="ipInfo" title="<spring:message code="comUatUap.loginPolicyUpdt.ipInfo"/>" type="text" value="<c:out value='${loginPolicy.ipInfo}'/>" maxLength="23" size="30" >&nbsp;<form:errors path="ipInfo" /><!-- IP정보 -->
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyUpdt.lmttAt"/> <span class="pilsu">*</span></th><!-- IP제한여부 -->
<td class="left">
<select name="lmttAt" id="lmttAt" title="<spring:message code="comUatUap.loginPolicyUpdt.lmttAt"/>"><!-- IP제한여부 -->
<option value="Y" <c:if test="${loginPolicy.lmttAt == 'Y'}">selected</c:if> >Y</option>
<option value="N" <c:if test="${loginPolicy.lmttAt == 'N'}">selected</c:if> >N</option>
</select>
</td>
</tr>
<tr>
<th><spring:message code="comUatUap.loginPolicyUpdt.regDate"/> <span class="pilsu">*</span></th><!-- 등록일시 -->
<td class="left">
<input name="regDate" id="regDate" title="<spring:message code="comUatUap.loginPolicyUpdt.regDate"/>" type="text" value="<c:out value='${loginPolicy.regDate}'/>" maxLength="50" readonly="readonly" style="width:180px" /><!-- 등록일시 -->
</td>
</tr>
</table>
<!-- 하단 버튼 -->
<div class="btn">
<input class="s_submit" type="submit" value='<spring:message code="button.save" />' onclick="fncLoginPolicyUpdate();return false;" /><!-- 저장 -->
<span class="btn_s"><a href="<c:url value='/uat/uap/removeLoginPolicy.do'/>?emplyrId=<c:out value='${loginPolicyVO.emplyrId}'/>" onclick="fncLoginPolicyDelete(); return false;"><spring:message code="button.delete" /></a></span><!-- 삭제 -->
<span class="btn_s"><a href="<c:url value='/uat/uap/selectLoginPolicyList.do'/>?pageIndex=<c:out value='${loginPolicyVO.pageIndex}'/>&amp;searchKeyword=<c:out value="${loginPolicyVO.searchKeyword}"/>&amp;searchCondition=1" onclick="fncSelectLoginPolicyList(); return false;"><spring:message code="button.list" /></a></span><!-- 목록 -->
</div>
<div style="clear:both;"></div>
</div>
<!-- 검색조건 유지 -->
<input type="hidden" name="dplctPermAt" value="Y" >
<input type="hidden" name="searchCondition" value="<c:out value='${loginPolicyVO.searchCondition}'/>" >
<input type="hidden" name="searchKeyword" value="<c:out value='${loginPolicyVO.searchKeyword}'/>" >
<input type="hidden" name="pageIndex" value="<c:out value='${loginPolicyVO.pageIndex}'/>" >
</form:form>
</body>
</html>
Loading…
Cancel
Save