parent
33da2b2129
commit
100656b50f
|
|
@ -182,14 +182,12 @@
|
|||
.menuList .result .list_item > div:nth-child(5) {width: 100px;}
|
||||
|
||||
/* 사이트관리 > 환경설정 > 메뉴권한관리 */
|
||||
.roleList .head > span:nth-child(1) {width: 120px;}
|
||||
.roleList .head > span:nth-child(2) {width: 180px;}
|
||||
.roleList .head > span:nth-child(3) {width: 120px;}
|
||||
.roleList .head > span:nth-child(1) {width: 180px;}
|
||||
.roleList .head > span:nth-child(2) {width: 120px;}
|
||||
.roleList .head .checkboxDiv {width: 60px;}
|
||||
.roleList .head .saveBtnDiv {width: 100px;}
|
||||
.roleList .result .list_item > div:nth-child(1) {width: 120px;}
|
||||
.roleList .result .list_item > div:nth-child(2) {width: 180px;}
|
||||
.roleList .result .list_item > div:nth-child(3) {width: 120px;}
|
||||
.roleList .result .list_item > div:nth-child(1) {width: 180px;}
|
||||
.roleList .result .list_item > div:nth-child(2) {width: 120px;}
|
||||
.roleList .result .list_item .checkboxDiv {width: 60px;}
|
||||
.roleList .result .list_item .saveBtnDiv {width: 100px;}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ function MenuAuthMgt(props) {
|
|||
// 리스트 항목 구성
|
||||
menuList.forEach(function (item, index) {
|
||||
const checkboxs = [];
|
||||
|
||||
roleList.forEach(function (role) {
|
||||
checkboxs.push(
|
||||
<div className={"checkboxDiv"}>
|
||||
|
|
@ -44,12 +45,19 @@ function MenuAuthMgt(props) {
|
|||
defaultChecked={item.menuAuth.includes(role.itemCd)}/>
|
||||
</div>
|
||||
)
|
||||
/*if(item.menuGroup){
|
||||
|
||||
}else{
|
||||
checkboxs.push(
|
||||
<div className={"checkboxDiv"}></div>
|
||||
)
|
||||
}*/
|
||||
});
|
||||
|
||||
mutListTag.push(
|
||||
<div className={"list_item"} key={"userListDiv_"+index}>
|
||||
<div>{item.menuId}</div>
|
||||
<div>{item.menuGroup?'└ ':''}{item.menuId}</div>
|
||||
<div>{item.menuTitle}</div>
|
||||
<div>{item.menuGroup}</div>
|
||||
{checkboxs}
|
||||
<div className={"saveBtnDiv"}>
|
||||
<button className={"btn btn_blue_h31 px-1"} onClick={()=>{editMenu(item)}}>저장</button>
|
||||
|
|
@ -73,27 +81,25 @@ function MenuAuthMgt(props) {
|
|||
},[]);
|
||||
|
||||
function editMenu(menu){
|
||||
if(window.confirm("수정하시겠습니까?")) {
|
||||
EgovNet.requestFetch(
|
||||
'/admin/config/menu-auth-mgt',
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(menu)
|
||||
EgovNet.requestFetch(
|
||||
'/admin/config/menu-auth-mgt',
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("수정되었습니다.")
|
||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
console.log("토큰 갱신중.")
|
||||
} else {
|
||||
alert(resp.result.resultMessage)
|
||||
}
|
||||
body: JSON.stringify(menu)
|
||||
},
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("수정되었습니다.")
|
||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
console.log("토큰 갱신중.")
|
||||
} else {
|
||||
alert(resp.result.resultMessage)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
|
|
@ -126,7 +132,6 @@ function MenuAuthMgt(props) {
|
|||
<div className="head">
|
||||
<span>메뉴 코드</span>
|
||||
<span>메뉴 이름</span>
|
||||
<span>부모 메뉴</span>
|
||||
{roleHeader}
|
||||
<span className={"saveBtnDiv"}></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@ public class CustomUrlAuthenticationSuccessHandler extends SimpleUrlAuthenticati
|
|||
MediaType jsonMimeType = MediaType.APPLICATION_JSON;
|
||||
HashMap<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
/*if(securityUser.getUserId().equals("admin") && !adminIpList.contains(accessIp)){
|
||||
/*
|
||||
// 관리자 계정 로그인 제한 if문
|
||||
if(securityUser.getUserId().equals("admin") && !adminIpList.contains(accessIp)){
|
||||
resultMap.put("resultCode", ResponseCode.FAILED.getCode());
|
||||
resultMap.put("resultMessage", "관리자 계정은 지정된 아이피에서만 접속할 수 있습니다.\n필요한 경우 관리자에게 요청하십시오.\n접속자 아이피: "+ClientUtils.getRemoteIP(request));
|
||||
}else{
|
||||
|
|
@ -75,7 +77,8 @@ public class CustomUrlAuthenticationSuccessHandler extends SimpleUrlAuthenticati
|
|||
//로그인 로그 기록
|
||||
adminLogsService.insertLoginLog(securityUser.getUserId(), accessIp, accessToken, "Y", ClientUtils.getWebType(request));
|
||||
}*/
|
||||
// 로그인 제한 해제시 주석 해제 및 위 if문 주석처리 할 것.
|
||||
|
||||
// 관리자 로그인 제한 해제 위 if문 주석처리 할 것.
|
||||
String accessToken = jwtTokenUtil.generateAccessToken(securityUser, request.getRemoteAddr());
|
||||
String refreshToken = jwtTokenUtil.generateRefreshTokenToken(securityUser, request.getRemoteAddr());
|
||||
resultMap.put("resultCode", ResponseCode.SUCCESS.getCode());
|
||||
|
|
@ -83,6 +86,7 @@ public class CustomUrlAuthenticationSuccessHandler extends SimpleUrlAuthenticati
|
|||
resultMap.put("refreshToken", refreshToken);
|
||||
adminLogsService.insertLoginLog(securityUser.getUserId(), accessIp, accessToken, "Y", ClientUtils.getWebType(request));
|
||||
|
||||
|
||||
if (jsonConverter.canWrite(resultMap.getClass(), jsonMimeType)) {
|
||||
jsonConverter.write(resultMap, jsonMimeType, new ServletServerHttpResponse(response));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue