fix : 유저 관련 수정

main
이범준 1 year ago
parent c2a75188e8
commit 8c002c4df5

@ -4033,8 +4033,6 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
String emsg = null; String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getUserId())) if(XitCmmnUtil.isEmpty(vo.getUserId()))
emsg = String.format("(%s)사용자ID(은)는 필수조건 입니다.", table); emsg = String.format("(%s)사용자ID(은)는 필수조건 입니다.", table);
// if(XitCmmnUtil.isEmpty(vo.getChange_de()))
// emsg = String.format("(%s)변경일(은)는 필수조건 입니다.", table);
if(emsg!=null){ if(emsg!=null){
logger.error(emsg); logger.error(emsg);
throw new RuntimeException(emsg); throw new RuntimeException(emsg);
@ -4237,6 +4235,8 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
String emsg = null; String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getUserId())) if(XitCmmnUtil.isEmpty(vo.getUserId()))
emsg = String.format("(%s)사용자ID(은)는 필수조건 입니다.", table); emsg = String.format("(%s)사용자ID(은)는 필수조건 입니다.", table);
if(XitCmmnUtil.isEmpty(vo.getUserAcnt()))
emsg = String.format("(%s)계정ID(은)는 필수조건 입니다.", table);
if(emsg!=null){ if(emsg!=null){
logger.error(emsg); logger.error(emsg);
throw new RuntimeException(emsg); throw new RuntimeException(emsg);

@ -81,6 +81,6 @@ public class XitSessionMapping extends EgovUsersByUsernameMapping {
loginVO.setElctrnsanctnUseYn(strElctrnsanctnUseYn); //전자결재 사용 여부 loginVO.setElctrnsanctnUseYn(strElctrnsanctnUseYn); //전자결재 사용 여부
loginVO.setJobConfmAuthorYn(strJobConfmAuthorYn); //업무 승인 권한 여부 loginVO.setJobConfmAuthorYn(strJobConfmAuthorYn); //업무 승인 권한 여부
return new EgovUserDetails(strUserAcnt, strPassWd, strEnabled, loginVO); return new EgovUserDetails(strUniqId, strPassWd, strEnabled, loginVO);
} }
} }

@ -165,8 +165,10 @@ public class XitLoginController extends AbstractController {
throw new IllegalStateException("No AuthenticationProcessingFilter"); throw new IllegalStateException("No AuthenticationProcessingFilter");
} }
springSecurity.doFilter(new RequestWrapperForSecurity(request, xitLoginVO.getUserSe() + xitLoginVO.getId(), springSecurity.doFilter(new RequestWrapperForSecurity(request,
xitLoginVO.getUniqId()), response, null); xitLoginVO.getUniqId(),
xitLoginVO.getPasswd()),
response, null);
xitLoginService.actionLoginSuccess();//로그인 Log 생성 xitLoginService.actionLoginSuccess();//로그인 Log 생성
@ -391,7 +393,7 @@ public class XitLoginController extends AbstractController {
model.addAttribute("result", result?"Y":"N"); model.addAttribute("result", result?"Y":"N");
model.addAttribute("message", message); model.addAttribute("message", message);
model.addAttribute("failDetail", failDetail); model.addAttribute("failDetail", failDetail);
model.addAttribute("temp_pwd", vo.getPasswd()); model.addAttribute("tempPwd", vo.getPasswd());
sLocationUrl = "forward:/login/findPwdPopup/result.do"; sLocationUrl = "forward:/login/findPwdPopup/result.do";
break; break;
@ -458,14 +460,6 @@ public class XitLoginController extends AbstractController {
USER_SE userSe = USER_SE.valueOf(loginVO.getUserSe()); USER_SE userSe = USER_SE.valueOf(loginVO.getUserSe());
if(!XitCmmnUtil.isEmpty(userSe)) { if(!XitCmmnUtil.isEmpty(userSe)) {
switch (userSe) { switch (userSe) {
case GNR: //일반회원
if(XitCmmnUtil.notEmpty(MAIN_PAGE_GNR))
url = MAIN_PAGE_GNR;
break;
case ENT: //기업회원
if(XitCmmnUtil.notEmpty(MAIN_PAGE_ENT))
url = MAIN_PAGE_ENT;
break;
case USR: //업무사용자 case USR: //업무사용자
if(XitCmmnUtil.notEmpty(MAIN_PAGE_USR)) if(XitCmmnUtil.notEmpty(MAIN_PAGE_USR))
url = MAIN_PAGE_USR; url = MAIN_PAGE_USR;
@ -483,13 +477,13 @@ public class XitLoginController extends AbstractController {
class RequestWrapperForSecurity extends HttpServletRequestWrapper { class RequestWrapperForSecurity extends HttpServletRequestWrapper {
private String username = null; private String username = null;
private String passwd = null; private String password = null;
public RequestWrapperForSecurity(HttpServletRequest request, String username, String passwd) { public RequestWrapperForSecurity(HttpServletRequest request, String id, String passwd) {
super(request); super(request);
this.username = username; this.username = id;
this.passwd = passwd; this.password = passwd;
} }
@Override @Override
@ -509,7 +503,7 @@ class RequestWrapperForSecurity extends HttpServletRequestWrapper {
} }
if (name.equals("xit_security_password")) { if (name.equals("xit_security_password")) {
return passwd; return password;
} }
return super.getParameter(name); return super.getParameter(name);

@ -46,15 +46,16 @@
jdbcUsersByUsernameQuery=" jdbcUsersByUsernameQuery="
/** 인증에 사용되는 사용자정보 조회 질의문 */ /** 인증에 사용되는 사용자정보 조회 질의문 */
SELECT USER_ID SELECT USER_ID
, USER_KEY AS PASSWD , USER_ACNT
, 1 ENABLED , PASSWD
, 1 AS ENABLED
, USER_NM , USER_NM
, ZIP , ZIP
, ADDR , ADDR
, EML_ADRS , EML_ADRS
, USER_SE , USER_SE
, ORG_ID , ORG_ID
, USER_KEY , USER_ID
, GRP_ID , GRP_ID
, NSTT_CD , NSTT_CD
, ORGNZT_NM , ORGNZT_NM
@ -63,13 +64,13 @@
, ELCTRNSANCTN_USE_YN , ELCTRNSANCTN_USE_YN
, JOB_CONFM_AUTHOR_YN , JOB_CONFM_AUTHOR_YN
FROM XIT_VW_USER_MASTR FROM XIT_VW_USER_MASTR
WHERE CONCAT(USER_SE, USER_ID) = ?" WHERE USER_ID = ?"
jdbcAuthoritiesByUsernameQuery=" jdbcAuthoritiesByUsernameQuery="
/** 인증된 사용자의 권한(authority) 조회 질의문 */ /** 인증된 사용자의 권한(authority) 조회 질의문 */
SELECT A.SCRTY_SETUP_TRGET_ID AS USER_ID SELECT A.SCRTY_SETUP_TRGET_ID AS USER_ID
,A.AUTHOR_CODE AS AUTHORITY ,A.AUTHOR_CODE AS AUTHORITY
FROM XIT_USER_SCRTY_SETUP A FROM XIT_USER_SCRTY_SETUP A
INNER JOIN XIT_VW_USER_MASTR B ON A.SCRTY_SETUP_TRGET_ID = B.USER_KEY INNER JOIN XIT_VW_USER_MASTR B ON A.SCRTY_SETUP_TRGET_ID = B.USER_ID
WHERE 1=1 WHERE 1=1
AND B.USER_ID = ?" AND B.USER_ID = ?"
jdbcMapClass="kr.xit.fims.framework.biz.cmm.service.bean.XitSessionMapping" jdbcMapClass="kr.xit.fims.framework.biz.cmm.service.bean.XitSessionMapping"

Loading…
Cancel
Save