feat: 권한그룹 반영

main
Jonguk. Lim 2 years ago
parent a7c0c3d638
commit 41aabf98cf

@ -1,6 +1,12 @@
package kr.xit.framework.biz.cmm.model;
import kr.xit.framework.core.model.BaseVO;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
*
@ -12,50 +18,19 @@ import kr.xit.framework.core.model.BaseVO;
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ToString
public class XitAuthorGroupInfoVO extends BaseVO {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -4390096179096398215L;
protected String group_id; //그룹 id
protected String group_nm; //그룹 명
protected String group_creat_de; //그룹 생성 일
protected String group_dc; //그룹 설명
protected String author_code; //권한 코드
public String getGroup_id() {
return group_id;
}
public void setGroup_id(String group_id) {
this.group_id = group_id;
}
public String getGroup_nm() {
return group_nm;
}
public void setGroup_nm(String group_nm) {
this.group_nm = group_nm;
}
public String getGroup_creat_de() {
return group_creat_de;
}
public void setGroup_creat_de(String group_creat_de) {
this.group_creat_de = group_creat_de;
}
public String getGroup_dc() {
return group_dc;
}
public void setGroup_dc(String group_dc) {
this.group_dc = group_dc;
}
public String getAuthor_code() {
return author_code;
}
public void setAuthor_code(String author_code) {
this.author_code = author_code;
}
private String groupId; //그룹 id
private String groupNm; //그룹 명
private String groupDc; //그룹 설명
private String authorCode; //권한 코드
private String authorNm;
private String groupCreatDe; //그룹 생성 일
}

@ -97,7 +97,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getGroup_id()))
if(XitCmmnUtil.isEmpty(vo.getGroupId()))
emsg = String.format("(%s)그룹ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -128,7 +128,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getGroup_id()))
if(XitCmmnUtil.isEmpty(vo.getGroupId()))
emsg = String.format("(%s)그룹ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -161,7 +161,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getGroup_id()))
if(XitCmmnUtil.isEmpty(vo.getGroupId()))
emsg = String.format("(%s)그룹ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -194,7 +194,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getGroup_id()))
if(XitCmmnUtil.isEmpty(vo.getGroupId()))
emsg = String.format("(%s)그룹ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -4981,7 +4981,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{
// logger.error(emsg);
// throw new RuntimeException(emsg);
// }
/**
*
*/

@ -523,16 +523,16 @@ public class XitFrameUnitServiceImpl implements XitFrameUnitService {
// 그룹의 권한 조회
XitAuthorGroupInfoVO groupInfo = new XitAuthorGroupInfoVO();
groupInfo.setGroup_id(groupId);
groupInfo.setGroupId(groupId);
groupInfo = xitFrameCrudService.findXitAuthorGroupInfo(groupInfo);
// 권한 설정
if (XitCmmnUtil.isEmpty(groupInfo))
return "ROLE_USER";
else {
if (XitCmmnUtil.isEmpty(groupInfo.getAuthor_code()))
if (XitCmmnUtil.isEmpty(groupInfo.getAuthorCode()))
return "ROLE_USER";
else
return groupInfo.getAuthor_code();
return groupInfo.getAuthorCode();
}
}

@ -51,6 +51,8 @@ public interface AuthAuthorMgtMapper {
int deleteAuthorInfo(final String authorCode);
List<XitRoleSclsrtRescueVO> selectRoleSclsrtRescues(final XitRoleSclsrtRescueVO vo);
XitRoleSclsrtRescueVO selectRoleSclsrtRescue(final XitRoleSclsrtRescueVO vo);
int insertRoleSclsrtRescue(final XitRoleSclsrtRescueVO vo);
int deleteRoleSclsrtRescue(final XitRoleSclsrtRescueVO vo);

@ -2,8 +2,13 @@ package kr.xit.framework.biz.mng.auth.mapper;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO;
import kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
@ -20,6 +25,26 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
@Mapper
public interface AuthGrpMgtMapper {
List<XitAuthorGroupInfoVO> selectAuthorGroupInfos(final Map<String, Object> paraMap, final RowBounds rowBounds);
XitAuthorGroupInfoVO selectAuthorGroupInfo(final String groupId);
int insertAuthorGroupInfo(final XitAuthorGroupInfoVO vo);
int updateAuthorGroupInfo(final XitAuthorGroupInfoVO vo);
int deleteAuthorGroupInfo(final String groupId);
/**
* <pre> : </pre>
* @param searchVO
@ -46,4 +71,6 @@ public interface AuthGrpMgtMapper {
* @date: 2020. 4. 16.
*/
public XitAuthGrpMngVO findView(XitAuthGrpMngVO vo) throws SQLException;
}

@ -32,16 +32,7 @@ public interface AuthAuthorMgtService {
* @date: 2020. 4. 16.
*/
List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap, final RowBounds rowBounds);
/**
* <pre> : </pre>
* @param vo
* @return XitAuthRegMngVO
* @author:
* @date: 2020. 4. 16.
*/
XitAuthorInfoVO findAuthAuthor(final String authorCode);
void addAuthAuthor(final XitAuthorInfoVO vo);
void modifyAuthAuthor(final XitAuthorInfoVO vo);
void removeAuthAuthor(final String authorCode);

@ -1,7 +1,12 @@
package kr.xit.framework.biz.mng.auth.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO;
import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
@ -17,6 +22,16 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
*/
public interface AuthGrpMgtService {
List<XitAuthorGroupInfoVO> findAuthGrps(final Map<String,Object> paraMap, final RowBounds rowBounds);
XitAuthorGroupInfoVO findAuthGrp(final String groupId);
void addAuthGrp(final XitAuthorGroupInfoVO vo);
void modifyAuthGrp(final XitAuthorGroupInfoVO vo);
void removeAuthGrp(final String authorCode);
/**
* <pre> : </pre>

@ -2,28 +2,44 @@ package kr.xit.framework.biz.mng.auth.service.impl;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO;
import kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO;
import kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.framework.biz.mng.auth.mapper.AuthAuthorMgtMapper;
import kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
import kr.xit.framework.biz.mng.auth.service.AuthGrpMgtService;
import kr.xit.framework.biz.mng.user.mapper.UserMgtMapper;
import kr.xit.framework.core.message.XitMessageSource;
import kr.xit.framework.core.utils.XitCmmnUtil;
import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.util.constants.MessageKey;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Service
public class AuthGrpMgtServiceImpl implements AuthGrpMgtService {
@Resource
private AuthGrpMgtMapper xitAuthGrpMngMapper;
private AuthGrpMgtMapper mapper;
@Resource
private AuthAuthorMgtMapper authAuthorMgtMapper;
@Resource
private UserMgtMapper userMgtMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource
@ -33,11 +49,145 @@ public class AuthGrpMgtServiceImpl implements AuthGrpMgtService {
@Resource
private XitMessageSource xitMessageSource;
@Override
public List<XitAuthorGroupInfoVO> findAuthGrps(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectAuthorGroupInfos(paraMap, rowBounds);
}
@Override
public XitAuthorGroupInfoVO findAuthGrp(final String groupId) {
return mapper.selectAuthorGroupInfo(groupId);
}
@Override
public void addAuthGrp(final XitAuthorGroupInfoVO vo) {
// 유효성 확인
boolean isChangePermission = isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode());
if(!isChangePermission)
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "자신의 권한보다 상위 권한을 설정 할 수 없습니다.");
try {
vo.setGroupId(idgenService.getNextStringId());
} catch (FdlException e) {
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage());
}
mapper.insertAuthorGroupInfo(vo);
}
@Override
public void modifyAuthGrp(final XitAuthorGroupInfoVO vo) {
// 유효성 확인
boolean isChangePermission = isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthorCode());
if(!isChangePermission)
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "자신의 권한보다 상위 권한을 설정 할 수 없습니다.");
mapper.updateAuthorGroupInfo(vo);
}
@Override
public void removeAuthGrp(final String groupId) {
mapper.deleteAuthorGroupInfo(groupId);
}
private boolean isCheckUserForCanChange(String uniqId, String trgetAuthorCode) {
//사용자보안설정 조회
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(uniqId);
List<XitUserScrtySetupVO> listUserScrtySetupVO = userMgtMapper.selectUserScrtySetups(userScrtySetupVO);
String userAuthorCode = XitCmmnUtil.isEmpty(listUserScrtySetupVO)?null:listUserScrtySetupVO.get(0).getAuthorCode();
return this.isCheckUserAuthorCodeForCanChange(userAuthorCode, trgetAuthorCode);
}
private boolean isCheckUserAuthorCodeForCanChange(String userAuthorCode, String trgetAuthorCode) {
//역할(권한)계층구조 데이터 목록 조회
List<XitRoleSclsrtRescueVO> listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(null);
//역할(권한)계층구조를 사용하지 않고 있는 경우 true 반환
if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO)) {
log.debug("Do not use a RoleSclsrtRescue Data !!");
return true;
}else {
//사용자의 권한 정보가 없을 때(비정상적인 루트로 등록한 사용자 계정으로 판단)
if(XitCmmnUtil.isEmpty(userAuthorCode)) {
log.debug("This user is have not UserScrtySetup Data !!");
return false;
}
}
boolean isExists = false;
//사용자 권한과 매칭되는 역할(권한)계층정보 유무 확인
for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) {
if(item.getParntsRole().equals(userAuthorCode)) {
isExists = true;
break;
}
}
//사용자 권한이 최상위 권한이면 true 반환
if(!isExists)
for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) {
if(item.getChldrnRole().equals(userAuthorCode)) {
log.debug("This user is Top-Level Author !!");
return true;
}
}
//사용자의 역할(권한)정보가 없으면 false 반환
if(!isExists) {
log.debug("This user is have not RoleSclsrtRescue Data !!");
return false;
}
/**
*
*
*/
return this.isHighAuthor(listRoleSclsrtRescueVO, userAuthorCode, trgetAuthorCode)?false:true;
}
private boolean isHighAuthor(List<XitRoleSclsrtRescueVO> list, String authorCode, String highAuthorCode) {
boolean result = false;
for (XitRoleSclsrtRescueVO item : list) {
// 상위 권한으로 확인 되었으면 stop
if (result)
break;
// 권한코드가 일치하지 않으면 skip
if (!item.getParntsRole().equals(authorCode))
continue;
if (item.getChldrnRole().equals(highAuthorCode)) { // 상위 권한과 일치하면
result = true;
} else { // 상위 권한과 일치하지 않으면 재호출
result = this.isHighAuthor(list, item.getChldrnRole(), highAuthorCode);
}
}
return result;
}
@Override
public List<XitAuthGrpMngVO> findList(XitAuthGrpMngSearchVO searchVO) {
List<XitAuthGrpMngVO> result = null;
try {
result = xitAuthGrpMngMapper.findList(searchVO);
result = mapper.findList(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자그룹관리 목록 조회 FAIL::", e);
}
@ -48,7 +198,7 @@ public class AuthGrpMgtServiceImpl implements AuthGrpMgtService {
public int findListTotCnt(XitAuthGrpMngSearchVO searchVO) {
int result = 0;
try {
result = xitAuthGrpMngMapper.findListTotCnt(searchVO);
result = mapper.findListTotCnt(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자그룹관리 목록 총건수 조회 FAIL::", e);
}
@ -59,7 +209,7 @@ public class AuthGrpMgtServiceImpl implements AuthGrpMgtService {
public XitAuthGrpMngVO findView(XitAuthGrpMngVO vo) {
XitAuthGrpMngVO result = null;
try {
result = xitAuthGrpMngMapper.findView(vo);
result = mapper.findView(vo);
} catch (SQLException e) {
throw new RuntimeException("사용자그룹관리 상세정보 조회 FAIL::", e);
}
@ -155,11 +305,11 @@ public class AuthGrpMgtServiceImpl implements AuthGrpMgtService {
*/
private XitAuthorGroupInfoVO convertToCrudVO(XitAuthGrpMngVO vo) {
XitAuthorGroupInfoVO authorGroupInfoVO = new XitAuthorGroupInfoVO();
authorGroupInfoVO.setGroup_id (vo.getGroupId()); //그룹 id
authorGroupInfoVO.setGroup_nm (vo.getGroupNm()); //그룹 명
authorGroupInfoVO.setGroupId(vo.getGroupId()); //그룹 id
authorGroupInfoVO.setGroupNm(vo.getGroupNm()); //그룹 명
// authorGroupInfoVO.setGroup_creat_de(); //그룹 생성 일
authorGroupInfoVO.setGroup_dc (vo.getGroupDc()); //그룹 설명
authorGroupInfoVO.setAuthor_code (vo.getAuthorCode()); //권한 코드
authorGroupInfoVO.setGroupDc(vo.getGroupDc()); //그룹 설명
authorGroupInfoVO.setAuthorCode(vo.getAuthorCode()); //권한 코드
return authorGroupInfoVO;
}

@ -84,7 +84,7 @@ public class AuthAuthorMgtController {
public ModelAndView mngAuthAuthorMgtPopup(@ModelAttribute final XitAuthorInfoVO vo){
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(vo)){
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getAuthorCode())){
mav.addObject("authorInfoVO", new XitAuthorInfoVO());
mav.addObject("pageTitle", "권한 등록");
} else {

@ -18,6 +18,7 @@ import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@ -26,6 +27,7 @@ import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO;
import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
@ -38,8 +40,10 @@ import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.core.utils.XitCmmnUtil;
import kr.xit.framework.core.validation.XitBeanValidator;
import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.AjaxUtils;
import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.constants.MessageKey;
/**
*
@ -78,14 +82,14 @@ public class AuthGrpMgtController {
}
@RequestMapping(value = "/mngAuthGrpMgtPopup")
public ModelAndView mngAuthAuthorMgtPopup(@ModelAttribute final XitAuthGrpMngVO vo){
public ModelAndView mngAuthAuthorMgtPopup(@ModelAttribute final XitAuthorGroupInfoVO vo){
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(vo)){
mav.addObject("authGrpVO", new XitAuthGrpMngVO());
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getGroupId())){
mav.addObject("groupManage", new XitAuthorGroupInfoVO());
mav.addObject("pageTitle", "권한그룹 등록");
} else {
mav.addObject("authGrpVO", vo);
mav.addObject("groupManage", vo);
mav.addObject("pageTitle", "권한그룹 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthGrpMgtPopup.popup");
@ -94,10 +98,41 @@ public class AuthGrpMgtController {
@GetMapping(value = "/findAuthGrps")
public ModelAndView findAuthAuthors(@RequestParam final Map<String,Object> paraMap) {
//return ResultResponse.of(service.findAuthAuthors(paraMap, MybatisUtils.getPagingInfo(paraMap)));
return null;
return ResultResponse.of(service.findAuthGrps(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(value = "/addAuthGrp")
//public ModelAndView addAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo, final BindingResult bindingResult){
public ModelAndView addAuthAuthor(@ModelAttribute final XitAuthorGroupInfoVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
//TODO : validate
//ValidationError.of("", vo, bindingResult);
service.addAuthGrp(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(value = "/modifyAuthGrp")
//public ModelAndView modifyAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo, final BindingResult bindingResult){
public ModelAndView modifyAuthAuthor(@ModelAttribute final XitAuthorGroupInfoVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
//TODO : validate
//ValidationError.of("", vo, bindingResult);
service.modifyAuthGrp(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(value = "/removeAuthGrp")
public ModelAndView removeAuthAuthor(final String groupId){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeAuthGrp(groupId);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}

@ -77,7 +77,7 @@ public class AuthRoleMgtController {
public ModelAndView mngAuthRoleMgtPopup(@ModelAttribute final XitRoleInfoVO vo){
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(vo)){
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getRoleCode())){
mav.addObject("roleManage", new XitRoleInfoVO());
mav.addObject("pageTitle", "롤 등록");
} else {

@ -32,6 +32,7 @@ public interface UserMgtMapper {
*/
List<XitUserInfoVO> selectUsers(final Map<String,Object> paraMap, final RowBounds rowBounds);
XitUserInfoVO selectUser(final String uniqId);
@SuppressWarnings("MybatisXMapperMethodInspection")
Map<String,Object> selectCheckUserInfo(final String userId);
int insertUserInfo(final XitUserInfoVO vo);
int updateUserInfo(final XitUserInfoVO vo);
@ -42,11 +43,12 @@ public interface UserMgtMapper {
Map<String,Object> selectAuthorGroupInfo(final Map<String,Object> map);
//Map<String,Object> selectAuthorGroupInfo(final Map<String,Object> map);
List<XitUserScrtySetupVO> selectUserScrtySetups(final XitUserScrtySetupVO vo);
XitUserScrtySetupVO selectUserScrtySetup(final String scrtySetupTrgetId);
int insertUserScrtySetup(final XitUserScrtySetupVO vo);
int updateUserScrtySetup(final XitUserScrtySetupVO vo);

@ -38,8 +38,6 @@ public interface UserMgtService {
String getDefaultAuthorCode(final String groupId);
Map<String, Object> findAuthorGroupInfo(final String groupId);
int addUserScrtySetup(final XitUserScrtySetupVO vo);
int addXitUserEtcOption(final XitUserEtcOptionVO vo);

@ -13,11 +13,13 @@ import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO;
import kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO;
import kr.xit.framework.biz.cmm.model.XitUserInfoVO;
import kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.cmm.model.XitLoginVO;
import kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper;
import kr.xit.framework.biz.mng.user.mapper.UserMgtMapper;
import kr.xit.framework.biz.mng.user.model.XitUserRegMngVO;
import kr.xit.framework.biz.mng.user.service.UserMgtService;
@ -33,6 +35,8 @@ public class UserMgtServiceImpl implements UserMgtService {
@Resource
private UserMgtMapper mapper;
@Resource
private AuthGrpMgtMapper authGrpMgtMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource
private XitMessageSource xitMessageSource;
@ -165,26 +169,18 @@ public class UserMgtServiceImpl implements UserMgtService {
public String getDefaultAuthorCode(final String groupId) {
if(Checks.isEmpty(groupId)) return "ROLE_USER";
Map<String,Object> authMap = findAuthorGroupInfo(groupId);
XitAuthorGroupInfoVO vo = authGrpMgtMapper.selectAuthorGroupInfo(groupId);
// 권한 설정
if (Checks.isEmpty(authMap))
if (Checks.isEmpty(vo))
return "ROLE_USER";
else {
if (Checks.isEmpty(authMap.get("author_code")))
if (Checks.isEmpty(vo.getAuthorCode()))
return "ROLE_USER";
else
return String.valueOf(authMap.get("author_code"));
return vo.getAuthorCode();
}
}
@Override
public Map<String, Object> findAuthorGroupInfo(final String groupId) {
if(Checks.isEmpty(groupId)) throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "그룹ID(은)는 필수조건 입니다");
Map<String,Object> map = new HashMap<>();
map.put("groupId", groupId);
return mapper.selectAuthorGroupInfo(map);
}
@Override
public int addUserScrtySetup(final XitUserScrtySetupVO vo) {

@ -42,6 +42,7 @@
SELECT author_code AS code
, author_nm AS code_nm
FROM xit_author_info
</when>

@ -114,8 +114,8 @@
<!-- *************************************************************************************************************
* xit_role_sclsrt_rescue : 역할 계층 정보
************************************************************************************************************** -->
<select id="findRoleSclsrtRescues" resultType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO">
/* auth-author-mysql-mapper|findRoleSclsrtRescues-역할계층 조회|julim */
<select id="selectRoleSclsrtRescues" parameterType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO" resultType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO">
/* auth-author-mysql-mapper|selectRoleSclsrtRescues-역할계층 조회|julim */
SELECT parnts_role
, chldrn_role
FROM xit_role_sclsrt_rescue
@ -129,8 +129,8 @@
</where>
</select>
<select id="findRoleSclsrtRescue" parameterType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO" resultType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO">
/* auth-author-mysql-mapper|findRoleSclsrtRescue-역할계층 정보 조회|julim */
<select id="selectRoleSclsrtRescue" parameterType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO" resultType="kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO">
/* auth-author-mysql-mapper|selectRoleSclsrtRescue-역할계층 정보 조회|julim */
SELECT parnts_role
, chldrn_role
FROM xit_role_sclsrt_rescue

@ -3,71 +3,68 @@
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper">
<!-- *************************************************************************************************************
* xit_user_info : 업무사용자 정보
* xit_author_group_info : 권한그룹 정보
************************************************************************************************************** -->
<select id="findXitAuthorGroupInfos" resultType="kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO">
/** findXitAuthorGroupInfos */
/** 권한그룹정보 다건 조회 */
SELECT GROUP_ID
,GROUP_NM
,GROUP_CREAT_DE
,GROUP_DC
,AUTHOR_CODE
FROM XIT_AUTHOR_GROUP_INFO
WHERE 1=1
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">AND GROUP_ID = #{group_id }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_nm )">AND GROUP_NM = #{group_nm }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_creat_de)">AND GROUP_CREAT_DE = #{group_creat_de }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_dc )">AND GROUP_DC = #{group_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(author_code )">AND AUTHOR_CODE = #{author_code }</if>
<select id="selectAuthorGroupInfos" resultType="kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO">
/* auth-grp-mysql-mapper|selectAuthorGroupInfos-권한그룹 목록 조회|julim */
SELECT agi.group_id
, agi.group_nm
, agi.group_dc
, agi.author_code
, xai.author_nm
, agi.group_creat_de
FROM xit_author_group_info agi
LEFT OUTER JOIN xit_author_info xai
ON agi.author_code = xai.author_code
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(groupNm)">
AND agi.group_nm = #{groupNm}
</if>
</where>
</select>
<select id="findXitAuthorGroupInfo" resultType="kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO">
/** findXitAuthorGroupInfo */
/** 권한그룹정보 조회 */
SELECT GROUP_ID
,GROUP_NM
,GROUP_CREAT_DE
,GROUP_DC
,AUTHOR_CODE
FROM XIT_AUTHOR_GROUP_INFO
WHERE 1=1
AND GROUP_ID = #{group_id}
<select id="selectAuthorGroupInfo" resultType="kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO">
/* auth-grp-mysql-mapper|selectAuthorGroupInfo-권한그룹 정보 조회|julim */
SELECT group_id
, group_nm
, group_dc
, author_code
, group_creat_de
FROM xit_author_group_info
WHERE group_id = #{groupId}
</select>
<insert id="addXitAuthorGroupInfo">
/** addXitAuthorGroupInfo */
/** 권한그룹정보 등록 */
INSERT INTO XIT_AUTHOR_GROUP_INFO(
GROUP_ID
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_nm )">,GROUP_NM</if>
,GROUP_CREAT_DE
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_dc )">,GROUP_DC</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(author_code)">,AUTHOR_CODE</if>
<insert id="insertAuthorGroupInfo">
/* auth-grp-mysql-mapper|insertAuthorGroupInfo-권한그룹 등록|julim */
INSERT INTO xit_author_group_info(
group_id
, group_nm
, group_dc
, author_code
, group_creat_de
)VALUES(
#{group_id }
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_nm )">,#{group_nm }</if>
,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_dc )">,#{group_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(author_code)">,#{author_code }</if>
#{groupId}
, #{groupNm}
, #{groupDc}
, #{authorCode}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
)
</insert>
<update id="modifyXitAuthorGroupInfo">
/** modifyXitAuthorGroupInfo */
/** 권한그룹정보 수정 */
UPDATE XIT_AUTHOR_GROUP_INFO
SET
GROUP_CREAT_DE = GROUP_CREAT_DE
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(group_nm )">,GROUP_NM = #{group_nm }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(group_dc )">,GROUP_DC = #{group_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(author_code)">,AUTHOR_CODE = #{author_code}</if>
WHERE 1=1
AND GROUP_ID = #{group_id}
<update id="updateAuthorGroupInfo">
/* auth-grp-mysql-mapper|updateAuthorGroupInfo-권한그룹 정보 변경|julim */
UPDATE xit_author_group_info
SET group_nm = IF(group_nm = #{groupNm}, group_nm, #{groupNm})
, group_dc = IF(group_dc = #{groupDc}, group_dc, #{groupDc})
, author_code = IF(author_code = #{authorCode}, author_code, #{authorCode})
WHERE group_id = #{groupId}
</update>
<delete id="removeXitAuthorGroupInfo">
/** removeXitAuthorGroupInfo */
/** 권한그룹정보 삭제 */
DELETE FROM XIT_AUTHOR_GROUP_INFO
WHERE 1=1
AND GROUP_ID = #{group_id}
<delete id="deleteAuthorGroupInfo">
/* auth-grp-mysql-mapper|deleteAuthorGroupInfo-권한그룹 삭제|julim */
DELETE
FROM xit_author_group_info
WHERE group_id = #{groupId}
</delete>
@ -77,6 +74,17 @@
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -205,13 +205,14 @@
<!-- *************************************************************************************************************
* xit_entrprs_mber : 기업사용자 정보
************************************************************************************************************** -->
<delete id="delectEntrprsMber" parameterType="string">
<delete id="deleteEntrprsMber" parameterType="string">
/* user-mysql-mapper|delectEntrprsMber-기업사용자정보 삭제|julim */
DELETE
FROM xit_entrprs_mber
WHERE entrprs_mber_id = #{userId}
</delete>
<!-- *************************************************************************************************************
* xit_author_group_info : 권한그룹 정보
************************************************************************************************************** -->
@ -467,116 +468,5 @@
<select id="findXitUserInfoChangeDtlss" resultType="kr.xit.framework.biz.cmm.model.XitUserInfoChangeDtlsVO">
/** findXitUserInfoChangeDtlss */
/** 사용자정보변경내역 다건 조회 */
SELECT USER_ID
,CHANGE_DE
,ORGNZT_ID
,GROUP_ID
,EMPL_NO
,SEXDSTN_CODE
,BRTHDY
,FXNUM
,HOUSE_ADRES
,HOUSE_END_TELNO
,AREA_NO
,DETAIL_ADRES
,ZIP
,OFFM_TELNO
,MBTLNUM
,EMAIL_ADRES
,HOUSE_MIDDLE_TELNO
,PSTINST_CODE
,USER_STTUS_CODE
,ESNTL_ID
FROM XIT_USER_INFO_CHANGE_DTLS
WHERE 1=1
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(user_id )">AND USER_ID = #{user_id }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(change_de )">AND CHANGE_DE = #{change_de }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(orgnzt_id )">AND ORGNZT_ID = #{orgnzt_id }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">AND GROUP_ID = #{group_id }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(empl_no )">AND EMPL_NO = #{empl_no }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(sexdstn_code )">AND SEXDSTN_CODE = #{sexdstn_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(brthdy )">AND BRTHDY = #{brthdy }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(fxnum )">AND FXNUM = #{fxnum }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(house_adres )">AND HOUSE_ADRES = #{house_adres }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(house_end_telno )">AND HOUSE_END_TELNO = #{house_end_telno }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">AND AREA_NO = #{area_no }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">AND DETAIL_ADRES = #{detail_adres }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(zip )">AND ZIP = #{zip }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(offm_telno )">AND OFFM_TELNO = #{offm_telno }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(mbtlnum )">AND MBTLNUM = #{mbtlnum }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(email_adres )">AND EMAIL_ADRES = #{email_adres }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(house_middle_telno)">AND HOUSE_MIDDLE_TELNO = #{house_middle_telno}</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(pstinst_code )">AND PSTINST_CODE = #{pstinst_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(user_sttus_code )">AND USER_STTUS_CODE = #{user_sttus_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">AND ESNTL_ID = #{esntl_id }</if>
</select>
<select id="findXitUserInfoChangeDtls" resultType="kr.xit.framework.biz.cmm.model.XitUserInfoChangeDtlsVO">
/** findXitUserInfoChangeDtls */
/** 사용자정보변경내역 조회 */
SELECT USER_ID
,CHANGE_DE
,ORGNZT_ID
,GROUP_ID
,EMPL_NO
,SEXDSTN_CODE
,BRTHDY
,FXNUM
,HOUSE_ADRES
,HOUSE_END_TELNO
,AREA_NO
,DETAIL_ADRES
,ZIP
,OFFM_TELNO
,MBTLNUM
,EMAIL_ADRES
,HOUSE_MIDDLE_TELNO
,PSTINST_CODE
,USER_STTUS_CODE
,ESNTL_ID
FROM XIT_USER_INFO_CHANGE_DTLS
WHERE 1=1
AND USER_ID = #{user_id }
AND CHANGE_DE = #{change_de}
</select>
<update id="modifyXitUserInfoChangeDtls">
/** modifyXitUserInfoChangeDtls */
/** 사용자정보변경내역 수정 */
UPDATE XIT_USER_INFO_CHANGE_DTLS
SET
CHANGE_DE = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(orgnzt_id )">,ORGNZT_ID = #{orgnzt_id }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(group_id )">,GROUP_ID = #{group_id }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(empl_no )">,EMPL_NO = #{empl_no }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(sexdstn_code )">,SEXDSTN_CODE = #{sexdstn_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(brthdy )">,BRTHDY = #{brthdy }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(fxnum )">,FXNUM = #{fxnum }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(house_adres )">,HOUSE_ADRES = #{house_adres }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(house_end_telno )">,HOUSE_END_TELNO = #{house_end_telno }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(area_no )">,AREA_NO = #{area_no }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(detail_adres )">,DETAIL_ADRES = #{detail_adres }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(zip )">,ZIP = #{zip }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(offm_telno )">,OFFM_TELNO = #{offm_telno }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(mbtlnum )">,MBTLNUM = #{mbtlnum }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(email_adres )">,EMAIL_ADRES = #{email_adres }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(house_middle_telno)">,HOUSE_MIDDLE_TELNO = #{house_middle_telno}</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(pstinst_code )">,PSTINST_CODE = #{pstinst_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(user_sttus_code )">,USER_STTUS_CODE = #{user_sttus_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(esntl_id )">,ESNTL_ID = #{esntl_id }</if>
WHERE 1=1
AND USER_ID = #{user_id }
AND CHANGE_DE = #{change_de}
</update>
<delete id="removeXitUserInfoChangeDtls">
/** removeXitUserInfoChangeDtls */
/** 사용자정보변경내역 삭제 */
DELETE FROM XIT_USER_INFO_CHANGE_DTLS
WHERE 1=1
AND USER_ID = #{user_id }
AND CHANGE_DE = #{change_de}
</delete>
</mapper>

@ -153,7 +153,10 @@
name: 'authorCreatDe',
width: 120,
sortable: false,
align: 'center'
align: 'center',
formatter({value}) {
return setDateTimeFmt(value); //
}
},
{
header: '롤정보',

@ -40,6 +40,19 @@
</form:form>
<script type="text/javaScript">
class Form {
constructor(grid) {
this.grid = grid;
};
search(){
grid.reloadData();
}
}
/**************************************************************************
* Global Variable
**************************************************************************/
@ -84,7 +97,7 @@
$('#btnSearch').bind('click', () => fnBiz.search());
$('#btnRegist').bind('click', () => {
fnBiz.pagePopup('add', {});
fnBiz.pagePopup('add', null);
});
});
@ -145,11 +158,14 @@
}
},
{
header: '등록일',
header: '등록일',
name: 'groupCreatDe',
width: 120,
sortable: false,
align: 'center'
align: 'center',
formatter({value}) {
return setDateTimeFmt(value); //
}
}
];

@ -1,10 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="isUpdate" value="${!empty authGrpVO.groupId}"/>
<c:set var="bizName" value="권한그룹"/>
<form>
<%--@elvariable id="groupManage" type=""--%>
<form:form commandName="groupManage" name="groupManage">
<c:set var="isUpdate" value="${!empty groupManage.groupId}"/>
<c:set var="bizName" value="권한그룹"/>
<c:out value='${isUpdate}'/>
<div class="popup" style="min-width: 400px;">
<div class="popup_inner" style="max-width: 400px;">
@ -22,7 +24,7 @@
<label>권한그룹 ID</label>
</th>
<td nowrap="nowrap">
<input name="groupId" id="groupId" type="text" readonly="readonly" value="<c:out value='${authGrpVO.groupId}'/>" readonly="${isUpdate}" size="40" title="그룹 ID" />
<form:input path="groupId" id="groupId" cssClass="txaIpt" readonly="${isUpdate}" size="40" title="그룹 ID" />
</td>
</tr>
<tr>
@ -30,15 +32,16 @@
<label>권한그룹 명</label>
</th>
<td nowrap="nowrap">
<input name="groupNm" id="groupNm" type="text" value="<c:out value='${authGrpVO.groupNm}'/>" maxLength="50" size="40" title="그룹명" />&nbsp;<form:errors path="groupNm" />
<input name="groupNm" id="groupNm" type="text" value="<c:out value='${groupManage.groupNm}'/>" maxLength="50" size="40" title="그룹명" />&nbsp;
<form:errors path="groupNm" />
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap="nowrap">
<th scope="row" nowrap="nowrap">
<label>권한</label>
</th>
<td nowrap="nowrap">
<code:select type="AUTH_GRP" id="authorCode" name="autorCode" defaultSelect="${authGrpVO.authorCode}" title="권한" cls="selectBox" alt="selectBox tag"/>
<code:select type="AUTH_GRP" id="authorCode" name="authorCode" defaultSelect="${groupManage.authorCode}" title="권한" cls="selectBox" alt="selectBox tag"/>
</td>
</tr>
<tr>
@ -46,7 +49,7 @@
<label>설명</label>
</th>
<td nowrap="nowrap">
<input name="groupDc" id="groupDc" type="text" value="<c:out value='${authGrpVO.groupDc}'/>" maxLength="50" size="50" title="설명" />
<input name="groupDc" id="groupDc" type="text" value="<c:out value='${groupManage.groupDc}'/>" maxLength="50" size="50" title="설명" />
</td>
</tr>
<tr>
@ -54,7 +57,7 @@
<label>등록일자</label>
</th>
<td nowrap="nowrap">
<input name="groupCreatDe" id="groupCreatDe" type="text" value="<c:out value='${authGrpVO.groupCreatDe}'/>" maxLength="50" size="20" readonly="readonly" title="등록일자"/>
<input name="groupCreatDe" id="groupCreatDe" type="text" value="<c:out value='${groupManage.groupCreatDe}'/>" maxLength="50" size="20" readonly="readonly" title="등록일자"/>
</td>
</tr>
</table>
@ -62,11 +65,10 @@
</div>
</div>
</form>
</form:form>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
@ -79,8 +81,8 @@
if(!fnBiz.validate()) return;
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/auth/addAuthAuthor.do"/>'
,data: $("form").serialize()
url: '<c:url value="/framework/biz/mng/auth/addAuthGrp.do"/>'
,data: $("#groupManage").serialize()
//,contentType: 'x-www-form-url-encoded'
})
}
@ -89,26 +91,26 @@
if(!fnBiz.validate()) return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/auth/modifyAuthAuthor.do"/>'
,data: $("form").serialize()
url: '<c:url value="/framework/biz/mng/auth/modifyAuthGrp.do"/>'
,data: $("#groupManage").serialize()
});
}
, remove: () => {
cmmBizAjax('remove', {
url: '<c:url value="/framework/biz/mng/auth/removeAuthAuthor.do"/>'
,data: {authorCode: $('#authorCode').val()}
url: '<c:url value="/framework/biz/mng/auth/removeAuthGrp.do"/>'
,data: {groupId: $('#groupId').val()}
});
}
,validate: () => {
if($('#authorCode').val() === ''){
alert('[권한코드]는 필수 입니다.');
if($('#groupId').val() === ''){
alert('[권한그룹 ID]는 필수 입니다.');
$('#authorCode').focus();
return false;
}
if($('#authorNm').val() === ''){
alert('[권한명]은 필수 입니다.');
if($('#groupNm').val() === ''){
alert('[권한그룹 명]은 필수 입니다.');
$('#authorNm').focus();
return false;
}
@ -131,6 +133,6 @@
* initialize
**************************************************************************/
$(document).ready(function(){
$('#authorCreatDe').val(setDateTimeFmt('<c:out value="${authGrpVO.groupCreatDe}"/>'));
$('#groupCreatDe').val(setDateTimeFmt('<c:out value="${groupManage.groupCreatDe}"/>'));
});
</script>

Loading…
Cancel
Save