이준호 권한 개발중
This commit is contained in:
parent
17d7c4430b
commit
e6322950e6
@ -102,4 +102,8 @@ public interface EgovMenuCreateManageService {
|
||||
|
||||
void updateQuickList(MenuManageJTreeVO menuManageVO) throws Exception;
|
||||
|
||||
void deleteMenu(MenuManageVO menuManageVO) throws Exception;
|
||||
|
||||
void insertMenu(MenuManageVO menuManageVO) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@ -142,6 +142,25 @@ public class EgovMenuCreateManageServiceImpl extends EgovAbstractServiceImpl imp
|
||||
menuCreatVO.setUseYn("Y");//insert 시는 무조건 사용으로
|
||||
menuCreateManageDAO.insertMenuCreat(menuCreatVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMenu(MenuManageVO menuManageVO) throws Exception {
|
||||
MenuCreatVO menuCreatVO = new MenuCreatVO();
|
||||
menuCreatVO.setAuthorCode(menuManageVO.getAuthorCode());
|
||||
menuCreatVO.setMenuNo(menuManageVO.getMenuNo());
|
||||
menuCreatVO.setSiteId(menuManageVO.getSiteId());
|
||||
menuCreateManageDAO.deleteMenuCreatAuthNo(menuCreatVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertMenu(MenuManageVO menuManageVO) throws Exception {
|
||||
MenuCreatVO menuCreatVO = new MenuCreatVO();
|
||||
menuCreatVO.setAuthorCode(menuManageVO.getAuthorCode());
|
||||
menuCreatVO.setMenuNo(menuManageVO.getMenuNo());
|
||||
menuCreatVO.setSiteId(menuManageVO.getSiteId());
|
||||
menuCreatVO.setUseYn("Y");//insert 시는 무조건 사용으로
|
||||
menuCreateManageDAO.insertMenuCreat(menuCreatVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuManageJTreeVO> selectMenuListJtreeWeb(MenuManageJTreeVO menuManageVO) throws Exception {
|
||||
|
||||
@ -339,7 +339,8 @@ public class EgovMenuCreateManageController {
|
||||
*/
|
||||
@RequestMapping("/sym/mnu/mcm/EgovMenuInfoAjax.do")
|
||||
public ModelAndView EgovMenuInfoAjax(@ModelAttribute("menuManageVO") MenuManageJTreeVO menuManageVO, @RequestParam("menuNo") String menuNo ,
|
||||
@ModelAttribute("searchVO") ComDefaultVO searchVO , ModelMap model) throws Exception {
|
||||
@ModelAttribute("searchVO") ComDefaultVO searchVO , ModelMap model
|
||||
,HttpServletResponse response , HttpServletRequest request) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
@ -389,7 +390,8 @@ public class EgovMenuCreateManageController {
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequestMapping("/sym/mnu/mcm/EgovMenuInfoInsertAjax.do")
|
||||
public ModelAndView insertEgovMenuInfoAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO, ProgrmManageVO progrmManageVO , ModelMap model) throws Exception {
|
||||
public ModelAndView insertEgovMenuInfoAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO, ProgrmManageVO progrmManageVO , ModelMap model
|
||||
, HttpServletResponse response , HttpServletRequest request) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
try{//최초 들어올때 임의의 menuManageVO 생성
|
||||
@ -478,7 +480,8 @@ public class EgovMenuCreateManageController {
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequestMapping(value = "/sym/mnu/mcm/EgovMenuInfoDeleteAjax.do")
|
||||
public ModelAndView deleteEgovMenuInfoDeleteAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO, ProgrmManageVO progrmManageVO , MenuCreatVO menuCreatVO, ModelMap model) throws Exception {
|
||||
public ModelAndView deleteEgovMenuInfoDeleteAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO, ProgrmManageVO progrmManageVO , MenuCreatVO menuCreatVO, ModelMap model
|
||||
, HttpServletResponse response , HttpServletRequest request) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
try{
|
||||
@ -537,13 +540,12 @@ public class EgovMenuCreateManageController {
|
||||
MenuCreatVO menuCreatVO ,
|
||||
ProgrmManageVO progrmManageVO ,
|
||||
@ModelAttribute("searchVO") ComDefaultVO searchVO ,
|
||||
ModelMap model) throws Exception {
|
||||
ModelMap model
|
||||
, HttpServletResponse response , HttpServletRequest request) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
int cnt = 0;
|
||||
|
||||
if(true) return new ModelAndView();
|
||||
|
||||
|
||||
try{
|
||||
try{
|
||||
if(!menuManageVO.getTmp_Id().equals(menuManageVO.getMenuNo()+"")){ //매뉴번호 변경시
|
||||
@ -606,7 +608,7 @@ public class EgovMenuCreateManageController {
|
||||
menuManageVO.setProgrmFileNm(progrmManageVO.getProgrmFileNm());
|
||||
progrmManageVO.setProgrmFileNm(menuManageVO.getProgrmFileNm());
|
||||
progrmManageService.updateProgrm(progrmManageVO);
|
||||
menuCreateManageDAO.updateMenuNo(menuCreatVO);
|
||||
// menuCreateManageDAO.updateMenuNo(menuCreatVO);
|
||||
}else{ //중복프로그램 조회 > del > insert
|
||||
if(menuManageVO.getMenuType().equals("M")){ //프로그램에서 매뉴로 바꿀시 lettnmenuinfo 만 업데이트 / lettnprogrmlist 삭제
|
||||
menuManageService.updateMenuManageJtree(menuManageVO);
|
||||
@ -661,14 +663,14 @@ public class EgovMenuCreateManageController {
|
||||
menuManageVO.setTmp_Id(menuCreatVO.getMenuNo()+"");
|
||||
menuManageService.deleteMenuManageBef(menuManageVO); //이전 메뉴 삭제
|
||||
}else{
|
||||
menuCreateManageDAO.deleteMenuCreatAuthNo(menuCreatVO);
|
||||
// menuCreateManageDAO.deleteMenuCreatAuthNo(menuCreatVO);
|
||||
cnt = menuManageService.updateMenuManageJtree(menuManageVO);
|
||||
menuCreatVO.setMenuNo(menuManageVO.getMenuNo());
|
||||
menuCreateManageDAO.insertMenuCreat(menuCreatVO);
|
||||
// menuCreateManageDAO.insertMenuCreat(menuCreatVO);
|
||||
}
|
||||
}
|
||||
|
||||
if(menuManageVO.getUpperMenuId()!=0){ //최상위는 제외
|
||||
if(menuManageVO.getUpperMenuId()!=0 || menuManageVO.getUpperMenuId()!=1){ //최상위는 제외(관리자메뉴, 사용자메뉴)
|
||||
menuManageService.resortMenuManage(menuManageVO);
|
||||
}
|
||||
if(delFlag){
|
||||
@ -712,6 +714,20 @@ public class EgovMenuCreateManageController {
|
||||
}catch (Exception e) {
|
||||
modelAndView.addObject("status", "fail");
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
//선택한 menuNo 모든 권한을 삭제
|
||||
menuCreateManageService.deleteMenu(menuManageVO);
|
||||
for(String author : menuManageVO.getAuthorChkList()) {
|
||||
menuManageVO.setAuthorCode(author);
|
||||
menuCreateManageService.insertMenu(menuManageVO);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
modelAndView.addObject("status", "authorFail");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
@ -725,7 +741,8 @@ public class EgovMenuCreateManageController {
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/sym/mnu/mcm/EgovMenuInfoNmUpdateAjax.do")
|
||||
public ModelAndView EgovMenuInfoNmUpdateAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO, ModelMap model) throws Exception {
|
||||
public ModelAndView EgovMenuInfoNmUpdateAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO, ModelMap model
|
||||
, HttpServletResponse response , HttpServletRequest request) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
try{
|
||||
@ -740,7 +757,8 @@ public class EgovMenuCreateManageController {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@RequestMapping("/sym/mnu/mcm/EgovMenuInfoMoveAjax.do")
|
||||
public ModelAndView EgovMenuInfoMoveAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO,
|
||||
@ModelAttribute("searchVO") ComDefaultVO searchVO ,ModelMap model) throws Exception {
|
||||
@ModelAttribute("searchVO") ComDefaultVO searchVO ,ModelMap model
|
||||
, HttpServletResponse response , HttpServletRequest request) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
try{
|
||||
@ -805,6 +823,7 @@ public class EgovMenuCreateManageController {
|
||||
public ModelAndView updateQuickMenuMngUpdateAjax(@RequestParam Map<?, ?> commandMap,
|
||||
@ModelAttribute("menuManageVO") MenuManageJTreeVO menuManageVO,
|
||||
@ModelAttribute("searchVO") CmmnDetailCodeVO searchVO
|
||||
, HttpServletResponse response , HttpServletRequest request
|
||||
)throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
@ -829,7 +848,7 @@ public class EgovMenuCreateManageController {
|
||||
@RequestMapping("/sym/mnu/mcm/MenuBbsSelectAjax.do")
|
||||
public ModelAndView MenuAddBbsInsertAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO,
|
||||
BoardMasterVO boardMasterVO,
|
||||
|
||||
HttpServletResponse response , HttpServletRequest request,
|
||||
ModelMap model) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
@ -850,7 +869,7 @@ public class EgovMenuCreateManageController {
|
||||
@RequestMapping("/sym/mnu/mcm/MenuBbsInsertAjax.do")
|
||||
public ModelAndView MenuBbsInsertAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO,
|
||||
BoardMasterVO boardMasterVO,
|
||||
|
||||
HttpServletResponse response , HttpServletRequest request,
|
||||
ModelMap model) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
@ -870,6 +889,7 @@ public class EgovMenuCreateManageController {
|
||||
@RequestMapping("/sym/mnu/mcm/HtmlComfirmAjax.do")
|
||||
public ModelAndView HtmlComfirmAjax(@ModelAttribute("menuManageVO") MenuManageVO menuManageVO,
|
||||
@ModelAttribute("cntManageVO") CntManageVO cntManageVO,
|
||||
HttpServletResponse response , HttpServletRequest request,
|
||||
ModelMap model) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
@ -297,15 +297,16 @@
|
||||
) AS SORT1
|
||||
, AA1.MENU_NO
|
||||
FROM LETTNMENUINFO AA1
|
||||
LEFT JOIN LETTNMENUCREATDTLS B ON AA1.MENU_NO = B.MENU_NO
|
||||
LEFT JOIN (SELECT AAA1.MENU_NO FROM LETTNMENUCREATDTLS AAA1 GROUP BY AAA1.MENU_NO) B ON AA1.MENU_NO = B.MENU_NO
|
||||
WHERE AA1.UPPER_MENU_NO = #upperMenuId#
|
||||
AND B.AUTHOR_CODE = #authorCode#) Subquery
|
||||
<!-- AND B.AUTHOR_CODE = #authorCode# -->
|
||||
) Subquery
|
||||
WHERE Subquery.MENU_NO = A.MENU_NO)
|
||||
WHERE EXISTS ( SELECT 1
|
||||
FROM LETTNMENUINFO AA1
|
||||
LEFT JOIN LETTNMENUCREATDTLS B ON AA1.MENU_NO = B.MENU_NO
|
||||
LEFT JOIN (SELECT AAA1.MENU_NO FROM LETTNMENUCREATDTLS AAA1 GROUP BY AAA1.MENU_NO) B ON AA1.MENU_NO = B.MENU_NO
|
||||
WHERE AA1.UPPER_MENU_NO = #upperMenuId#
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
<!-- AND B.AUTHOR_CODE = #authorCode# -->
|
||||
AND AA1.MENU_NO = A.MENU_NO)
|
||||
</update>
|
||||
|
||||
|
||||
@ -496,6 +496,9 @@ function fn_save_menuInfo(menuNo) {
|
||||
}else if(returnData.status == "duplProNm"){
|
||||
alert("이미 사용하고 있는 프로그램파일명이 있습니다.");
|
||||
|
||||
}else if(returnData.status == "authorFail"){
|
||||
alert("메뉴권한등록에 실패했습니다.");
|
||||
|
||||
}else{
|
||||
alert("ERROR");
|
||||
}
|
||||
@ -744,15 +747,15 @@ function set_bbs(){
|
||||
|
||||
<div class="cont">
|
||||
|
||||
<div class="menu_select">
|
||||
<%-- <div class="menu_select">
|
||||
<select name="authorCode" id="authorCode" class="select" onchange="jstreeRefresh(); return false;" title="검색조건선택">
|
||||
<%-- <option value='ROLE_ANONYMOUS' <c:if test="${menuCreatVO.authorCode == 'ROLE_ANONYMOUS' || empty menuCreatVO.authorCode }">selected</c:if>>사용자</option>
|
||||
<option value='ROLE_ADMIN' <c:if test="${menuCreatVO.authorCode == 'ROLE_ADMIN' }">selected</c:if>>관리자</option> --%>
|
||||
<option value='ROLE_ANONYMOUS' <c:if test="${menuCreatVO.authorCode == 'ROLE_ANONYMOUS' || empty menuCreatVO.authorCode }">selected</c:if>>사용자</option>
|
||||
<option value='ROLE_ADMIN' <c:if test="${menuCreatVO.authorCode == 'ROLE_ADMIN' }">selected</c:if>>관리자</option>
|
||||
<c:forEach var="authorList" items="${authorList}" varStatus="status">
|
||||
<option value='${authorList.authorCode}' <c:if test="${menuCreatVO.authorCode == authorList.authorCode}">selected</c:if>>${authorList.authorCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
<div class="menu_wrap">
|
||||
<div class="menu_area">
|
||||
|
||||
@ -139,6 +139,4 @@
|
||||
<auth-constraint></auth-constraint>
|
||||
</security-constraint>
|
||||
|
||||
<!-- tomcat clustering setting -->
|
||||
<distributable/>
|
||||
</web-app>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user