권한관리 작업중

강석 최 2022-08-25 18:39:21 +09:00
parent 45155c4ec6
commit 24fa44aada
10 changed files with 309 additions and 143 deletions

View File

@ -60,7 +60,7 @@ public class SecurityConfig{
protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeRequests() // 페이지 권한 설정 http.authorizeRequests() // 페이지 권한 설정
.antMatchers("/dashboard", "/refreshSession").hasRole(Role.USER.name()) // USER, ADMIN 접근 허용 .antMatchers("/dashboard", "/refreshSession").hasRole(Role.USER.name()) // USER, ADMIN 접근 허용
.antMatchers("/codeMgt/**", "/menuMgt/**").hasRole(Role.ADMIN.name()) // ADMIN만 접근 허용 .antMatchers("/codeMgt/**", "/menuMgt/**", "/authMgt/**").hasRole(Role.ADMIN.name()) // ADMIN만 접근 허용
.antMatchers("/login").permitAll() // 로그인 페이지는 권한 없이 접근 허용 .antMatchers("/login").permitAll() // 로그인 페이지는 권한 없이 접근 허용
.and() // 로그인 설정 .and() // 로그인 설정
.formLogin() .loginPage("/login") // Custom login form 사용 .formLogin() .loginPage("/login") // Custom login form 사용

View File

@ -2,6 +2,8 @@ package com.dbnt.faisp.controller;
import com.dbnt.faisp.menuMgt.MenuMgtService; import com.dbnt.faisp.menuMgt.MenuMgtService;
import com.dbnt.faisp.menuMgt.model.MenuMgt; import com.dbnt.faisp.menuMgt.model.MenuMgt;
import com.dbnt.faisp.userInfo.UserInfoService;
import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -15,15 +17,25 @@ import java.util.List;
public class AuthMgtController { public class AuthMgtController {
private final MenuMgtService menuMgtService; private final MenuMgtService menuMgtService;
private final UserInfoService userInfoService;
@GetMapping("/authMgtPage") @GetMapping("/authMgtPage")
public ModelAndView menuMgtPage(MenuMgt menuMgt) { public ModelAndView menuMgtPage(UserInfo userInfo) {
ModelAndView mav = new ModelAndView("/adminPage/authMgt/authMgt"); ModelAndView mav = new ModelAndView("/adminPage/authMgt/authMgt");
// menuMgt.setQueryInfo(); userInfo.setQueryInfo();
// mav.addObject("menuMgtList", menuMgtService.selectMenuMgtList(menuMgt)); mav.addObject("userInfoList", userInfoService.selectUserInfoList(userInfo));
// menuMgt.setContentCnt(menuMgtService.selectMenuMgtListCnt(menuMgt)); userInfo.setContentCnt(userInfoService.selectUserInfoListCnt(userInfo));
// menuMgt.setPaginationInfo(); userInfo.setPaginationInfo();
// mav.addObject("searchParams", menuMgt); mav.addObject("searchParams", userInfo);
return mav;
}
@GetMapping("/authEditModal")
public ModelAndView menuEditModal(UserInfo userInfo){
ModelAndView mav = new ModelAndView("/adminPage/authMgt/authEditModal");
userInfo.setAccessConfigList(null);// 기능구현 예정
userInfo.setApprovalConfigList(null);// 기능구현 예정
mav.addObject(userInfo);
return mav; return mav;
} }

View File

@ -12,6 +12,7 @@ import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@Service @Service
@ -27,20 +28,15 @@ public class UserInfoService implements UserDetailsService {
return "userIdDuplication"; return "userIdDuplication";
} }
userInfo.setUserRole(Role.USER.getValue()); userInfo.setUserRole(Role.USER.getValue());
userInfo.setUserStatus("ST002"); userInfo.setUserStatus("USC002");
userInfo.setPassword(convertPassword(userInfo.getPassword())); userInfo.setPassword(convertPassword(userInfo.getPassword()));
userInfo.setWrtDt(LocalDateTime.now());
return userInfoRepository.save(userInfo).getUserId(); return userInfoRepository.save(userInfo).getUserId();
} }
@Transactional @Transactional
public String updateUserInfo(UserInfo userInfo){ public String updateUserInfo(UserInfo userInfo){
UserInfo targetUserInfo = userInfoRepository.findById(userInfo.getUserSeq()).orElse(null); userInfo.setPassword(convertPassword(userInfo.getPassword()));
if(userInfo.getPassword() != null){ return userInfoRepository.save(userInfo).getUserId();
targetUserInfo.setPassword(convertPassword(userInfo.getPassword()));
}
targetUserInfo.setName(userInfo.getName());
targetUserInfo.setUserRole(userInfo.getUserRole());
targetUserInfo.setUserStatus(userInfo.getUserStatus());
return targetUserInfo.getUserId();
} }
public String updatePassword(UserInfo loginUser, UserInfo modifyInfo){ public String updatePassword(UserInfo loginUser, UserInfo modifyInfo){
@ -72,10 +68,4 @@ public class UserInfoService implements UserDetailsService {
return userInfoMapper.selectUserInfoListCnt(userInfo); return userInfoMapper.selectUserInfoListCnt(userInfo);
} }
public UserInfo selectUserInfoByUserSeq(UserInfo userInfo) {
return userInfoRepository.findById(userInfo.getUserSeq()).orElse(null);
}
public UserInfo selectUserInfoByUserId(String userId) {
return userInfoRepository.findByUserId(userId).orElse(null);
}
} }

View File

@ -1,5 +1,7 @@
package com.dbnt.faisp.userInfo.model; package com.dbnt.faisp.userInfo.model;
import com.dbnt.faisp.authMgt.model.AccessConfig;
import com.dbnt.faisp.authMgt.model.ApprovalConfig;
import com.dbnt.faisp.config.BaseModel; import com.dbnt.faisp.config.BaseModel;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -11,8 +13,10 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import javax.persistence.*; import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import java.util.Set; import java.util.Set;
@Getter @Getter
@ -31,12 +35,18 @@ public class UserInfo extends BaseModel implements UserDetails{
private String userId; private String userId;
@Column(name = "passwd") @Column(name = "passwd")
private String password; private String password;
@Column(name = "name") @Column(name = "user_nm")
private String name; private String userNm;
@Column(name = "og_cd")
private String ogCd;
@Column(name = "ofc_cd")
private String ofcCd;
@Column(name = "user_role") @Column(name = "user_role")
private String userRole; private String userRole;
@Column(name = "user_status") @Column(name = "user_status")
private String userStatus; private String userStatus;
@Column(name = "wrt_dt")
private LocalDateTime wrtDt;
@Transient @Transient
private String modifyPassword; private String modifyPassword;
@ -45,6 +55,11 @@ public class UserInfo extends BaseModel implements UserDetails{
@Transient @Transient
private String departmentName; private String departmentName;
@Transient
private List<AccessConfig> accessConfigList;
@Transient
private List<ApprovalConfig> approvalConfigList;
@Override @Override
public Collection<? extends GrantedAuthority> getAuthorities() { public Collection<? extends GrantedAuthority> getAuthorities() {
Set<GrantedAuthority> roles = new HashSet<>(); Set<GrantedAuthority> roles = new HashSet<>();
@ -76,6 +91,6 @@ public class UserInfo extends BaseModel implements UserDetails{
@Override @Override
public boolean isEnabled() { public boolean isEnabled() {
return userStatus.equals("ST003"); return userStatus.equals("USC003");
} }
} }

View File

@ -5,65 +5,48 @@
<mapper namespace="com.dbnt.faisp.userInfo.mapper.UserInfoMapper"> <mapper namespace="com.dbnt.faisp.userInfo.mapper.UserInfoMapper">
<select id="selectUserInfoList" resultType="UserInfo" parameterType="UserInfo"> <select id="selectUserInfoList" resultType="UserInfo" parameterType="UserInfo">
SELECT A.USER_SEQ AS userSeq, select user_seq,
A.USER_ID AS userId, user_id,
A.NAME AS name, user_nm,
A.POSITION AS position, address,
B.VALUE AS positionName, detail_addr,
A.DEPARTMENT AS department, email,
C.VALUE AS departmentName, og_cd,
A.USER_ROLE AS userRole, ofc_cd,
A.CREATE_DATE AS createDate, wrt_dt
A.USER_STATUS AS userStatus from user_info
FROM USER_INFO A where user_status != 'D'
INNER JOIN COMMON_CODE B
ON A.POSITION = B.CODE_SQ
INNER JOIN COMMON_CODE C
on A.DEPARTMENT = C.CODE_SQ
WHERE A.USER_STATUS != 'D'
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
AND A.USER_ID LIKE CONCAT ('%', #{userId},'%') and user_id like '%'||#{userId}||'%'
</if> </if>
<if test="name != null and name != ''"> <if test="userNm != null and userNm != ''">
AND A.NAME LIKE CONCAT ('%', #{name},'%') and user_nm like '%'||#{userNm}||'%'
</if> </if>
<if test="position != null and position != 0"> <if test="ogCd != null and ogCd != ''">
AND A.POSITION = #{position} and og_cd = #{ogCd}
</if> </if>
<if test="department != null and department != 0"> <if test="ofcCd != null and ofcCd != ''">
AND A.DEPARTMENT = #{department} and ofc_cd = #{ofcCd}
</if> </if>
<if test="startDate != null and startDate != ''"> order by og_cd, ofc_cd desc
AND A.CREATE_DATE >= #{startDate} limit #{rowCnt} offset #{firstIndex}
</if>
<if test="endDate != null and endDate != ''">
AND A.CREATE_DATE &lt;= #{endDate}
</if>
ORDER BY CREATE_DATE DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select> </select>
<select id="selectUserInfoListCnt" resultType="int" parameterType="UserInfo"> <select id="selectUserInfoListCnt" resultType="int" parameterType="UserInfo">
SELECT COUNT(*) select count(*)
FROM USER_INFO A from user_info
WHERE A.USER_STATUS != 'D' where user_status != 'D'
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
AND A.USER_ID LIKE CONCAT ('%', #{userId},'%') and user_id like '%'||#{userId}||'%'
</if> </if>
<if test="name != null and name != ''"> <if test="userNm != null and userNm != ''">
AND A.NAME LIKE CONCAT ('%', #{name},'%') and user_nm like '%'||#{userNm}||'%'
</if> </if>
<if test="position != null and position != 0"> <if test="ogCd != null and ogCd != ''">
AND A.POSITION = #{position} and og_cd = #{ogCd}
</if> </if>
<if test="department != null and department != 0"> <if test="ofcCd != null and ofcCd != ''">
AND A.DEPARTMENT = #{department} and ofc_cd = #{ofcCd}
</if>
<if test="startDate != null and startDate != ''">
AND A.CREATE_DATE >= #{startDate}
</if>
<if test="endDate != null and endDate != ''">
AND A.CREATE_DATE &lt;= #{endDate}
</if> </if>
</select> </select>
</mapper> </mapper>

View File

@ -0,0 +1,16 @@
$(document).on('click', '.userInfoTr', function (){
$.ajax({
url: '/authMgt/authEditModal',
data: {userSeq: Number($(this).find(".userSeq").val())},
type: 'GET',
dataType:"html",
success: function(html){
$("#configInfo").empty().append(html)
$("#authEditModal").modal('show');
},
error:function(){
}
});
})

View File

@ -35,7 +35,7 @@ function valueCheck(form){
const userId = targetForm.find("#userId").val(); const userId = targetForm.find("#userId").val();
const password = targetForm.find("#modalPassword"); const password = targetForm.find("#modalPassword");
const passwordConfirm = targetForm.find("#passwordConfirm"); const passwordConfirm = targetForm.find("#passwordConfirm");
const name = targetForm.find("#name").val() const userNm = targetForm.find("#userNm").val()
let returnFlag = true; let returnFlag = true;
if(!userId){ if(!userId){
@ -56,7 +56,7 @@ function valueCheck(form){
alert("비밀번호 확인을 입력해주세요."); alert("비밀번호 확인을 입력해주세요.");
returnFlag = false; returnFlag = false;
} }
if(!name){ if(!userNm){
alert("이름 입력해주세요."); alert("이름 입력해주세요.");
returnFlag = false; returnFlag = false;
} }

View File

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<!--<form id="authEditForm" action="#" method="post">-->
<!--<th:block th:if="${menuMgt.menuKey ne null}">
<input type="hidden" name="menuKey" id="menuKey" th:value="${menuMgt.menuKey}">
</th:block>-->
<div class="tab-pane fade show active" id="accessTabPanel" role="tabpanel" aria-labelledby="accessTab" tabindex="0">
<table class="table table-hover">
<thead>
<tr>
<th>대분류</th>
<th>중분류</th>
<th>소분류</th>
<th>관리</th>
<th>작성</th>
<th>조회</th>
</tr>
</thead>
<tbody>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="approvalTabPanel" role="tabpanel" aria-labelledby="approvalTab" tabindex="0">
<table class="table table-hover">
<thead>
<tr>
<th>대분류</th>
<th>중분류</th>
<th>계장대행</th>
<th>계장</th>
<th>과장대행</th>
<th>과장</th>
</tr>
</thead>
<tbody>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
<td>.</td>
</tr>
</tbody>
</table>
</div>
<!--<div class="row mb-3">
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">대분류</label>
<div class="col-sm-6">
<select class="form-select form-select-sm" id="cat1Cd" name="cat1Cd">
<option value="">대분류 선택</option>
<th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.categoryCd=='CAT1'}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd==menuMgt.cat1Cd}"></option>
</th:block>
</th:block>
</select>
</div>
</div>
<div class="row mb-3">
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">중분류</label>
<div class="col-sm-6">
<select class="form-select form-select-sm" id="cat2Cd" name="cat2Cd">
<option value="">중분류 선택</option>
<th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.categoryCd=='CAT2'}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd==menuMgt.cat2Cd}"></option>
</th:block>
</th:block>
</select>
</div>
</div>
<div class="row mb-3">
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">소분류</label>
<div class="col-sm-6">
<select class="form-select form-select-sm" id="cat3Cd" name="cat3Cd">
<option value="">소분류 선택</option>
<th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.categoryCd=='CAT3'}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd==menuMgt.cat3Cd}"></option>
</th:block>
</th:block>
</select>
</div>
</div>
<div class="row mb-3">
<label for="menuUrl" class="col-sm-4 col-form-label col-form-label-sm text-center">URL</label>
<div class="col-sm-6">
<input type="text" class="form-control form-control-sm" id="menuUrl" name="menuUrl" th:value="${menuMgt.menuUrl}">
</div>
</div>-->
<!--</form>-->
</html>

View File

@ -3,17 +3,17 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}"> layout:decorate="~{layout/layout}">
<th:block layout:fragment="script"> <th:block layout:fragment="script">
<!--<script type="text/javascript" th:src="@{/js/menuMgt/menuMgt.js}"></script>--> <script type="text/javascript" th:src="@{/js/authMgt/authMgt.js}"></script>
</th:block> </th:block>
<div layout:fragment="content"> <div layout:fragment="content">
<main class="pt-3"> <main class="pt-3">
<h4>권한 설정</h4> <h4>권한 설정</h4>
<!--<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/> <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row mx-0"> <div class="row mx-0">
<div class="col-12 card text-center"> <div class="col-12 card text-center">
<div class="card-body"> <div class="card-body">
<form method="get" th:action="@{/menuMgt/menuMgtPage}"> <form method="get" th:action="@{/authMgt/authMgtPage}">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}"> <input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between pe-3 py-1"> <div class="row justify-content-between pe-3 py-1">
<div class="col-auto"> <div class="col-auto">
@ -26,37 +26,30 @@
<div class="col-auto"> <div class="col-auto">
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="cat1Cd"> <select class="form-select form-select-sm" name="ogCd">
<option value="">대분류 선택</option> <option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCodeList}"> <th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.categoryCd=='CAT1'}"> <th:block th:if="${commonCode.categoryCd=='OG'}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat1Cd==commonCode.itemCd}"></option> <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="cat2Cd"> <select class="form-select form-select-sm" name="ofcCd">
<option value="">중분류 선택</option> <option value="">부서 선택</option>
<th:block th:each="commonCode:${session.commonCodeList}"> <th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.categoryCd=='CAT2'}"> <th:block th:if="${commonCode.categoryCd=='OFC'}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat2Cd==commonCode.itemCd}"></option> <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ofcCd==commonCode.itemCd}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="cat3Cd"> <input type="text" class="form-control form-control-sm" name="userNm" placeholder="사용자명" th:value="${searchParams.userNm}">
<option value="">소분류 선택</option>
<th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.categoryCd=='CAT3'}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat3Cd==commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<input type="text" class="form-control form-control-sm" name="menuUrl" placeholder="url" th:value="${searchParams.menuUrl}"> <input type="text" class="form-control form-control-sm" name="userId" placeholder="사용자 아이디" th:value="${searchParams.userId}">
</div> </div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색"> <input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div> </div>
@ -71,50 +64,40 @@
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="allChk"></th> <th></th>
<th>대분류</th> <th>소속</th>
<th>중분류</th> <th>부서</th>
<th>소분류</th> <th>계급</th>
<th>url</th> <th>성명</th>
<th>아이디</th>
<th>등록일</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="menuTr" th:each="menuMgt:${menuMgtList}"> <tr class="userInfoTr" th:each="userInfo:${userInfoList}">
<input type="hidden" class="menuKey" th:value="${menuMgt.menuKey}"> <input type="hidden" class="userSeq" th:value="${userInfo.userSeq}">
<input type="hidden" class="cat1Cd" th:value="${menuMgt.cat1Cd}">
<input type="hidden" class="cat2Cd" th:value="${menuMgt.cat2Cd}">
<input type="hidden" class="cat3Cd" th:value="${menuMgt.cat3Cd}">
<input type="hidden" class="menuUrl" th:value="${menuMgt.menuUrl}">
<td> <td>
<input type="checkbox" class="menuCheckBox" th:value="${menuMgt.menuKey}"> <input type="checkbox" class="userInfoCheckBox" th:value="${userInfo.userSeq}">
</td> </td>
<th:block th:if="${menuMgt.cat1RowspanCnt ne 0}" th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.itemCd == menuMgt.cat1Cd}">
<td th:text="${commonCode.itemValue}" th:rowspan="${menuMgt.cat1RowspanCnt}"></td>
</th:block>
</th:block>
<th:block th:if="${menuMgt.cat2RowspanCnt ne 0}" th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.itemCd == menuMgt.cat2Cd}">
<td th:text="${commonCode.itemValue}" th:rowspan="${menuMgt.cat2RowspanCnt}"></td>
</th:block>
</th:block>
<th:block th:each="commonCode:${session.commonCodeList}"> <th:block th:each="commonCode:${session.commonCodeList}">
<th:block th:if="${commonCode.itemCd == menuMgt.cat3Cd}"> <th:block th:if="${commonCode.itemCd == userInfo.ogCd}">
<td th:text="${commonCode.itemValue}"></td> <td th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
</th:block> </th:block>
<th:block th:if="${#strings.isEmpty(menuMgt.cat3Cd)}"> <th:block th:each="commonCode:${session.commonCodeList}">
<td></td> <th:block th:if="${commonCode.itemCd == userInfo.ofcCd}">
<td th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
<td th:text="${menuMgt.menuUrl}"></td> </th:block>
<td></td>
<td th:text="${userInfo.userNm}"></td>
<td th:text="${userInfo.userId}"></td>
<td th:text="${#temporals.format(userInfo.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="row justify-content-between"> <div class="row justify-content-center">
<div class="col-auto">
<input type="button" class="btn btn-success" value="선택 삭제" id="deleteCheckedBtn">
</div>
<div class="col-auto"> <div class="col-auto">
<nav aria-label="Page navigation"> <nav aria-label="Page navigation">
<ul class="pagination"> <ul class="pagination">
@ -140,8 +123,6 @@
</ul> </ul>
</nav> </nav>
</div> </div>
<div class="col-auto">
<input type="button" class="btn btn-success" value="메뉴 추가" id="addMenuBtn">
</div> </div>
</div> </div>
</div> </div>
@ -150,12 +131,32 @@
</div> </div>
</div> </div>
</div> </div>
</div>-->
</main> </main>
<div class="modal fade" id="menuEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="menuEditModalLabel" aria-hidden="true"> <div class="modal fade" id="authEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="authEditModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog modal-lg">
<div class="modal-content" id="menuEditModalContent"> <div class="modal-content" id="authEditModalContent">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">권한 편집</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="accessTab" data-bs-toggle="tab" data-bs-target="#accessTabPanel" type="button" role="tab" aria-controls="accessTabPanel" aria-selected="true">메뉴</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="approvalTab" data-bs-toggle="tab" data-bs-target="#approvalTabPanel" type="button" role="tab" aria-controls="approvalTabPanel" aria-selected="false">결재</button>
</li>
</ul>
<div class="tab-content border border-top-0" id="configInfo">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" id="saveAuthBtn">저장</button>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -65,9 +65,9 @@
<input type="text" class="form-control" id="userId" name="userId" autocomplete="off"> <input type="text" class="form-control" id="userId" name="userId" autocomplete="off">
<label for="userId" style="font-size: 12px">6~20자 사이의 알파벳, 숫자를 입력하세요</label> <label for="userId" style="font-size: 12px">6~20자 사이의 알파벳, 숫자를 입력하세요</label>
</div> </div>
<label for="name" class="col-sm-2 col-form-label text-center">이름</label> <label for="userNm" class="col-sm-2 col-form-label text-center">이름</label>
<div class="col-sm-4"> <div class="col-sm-4">
<input type="text" class=" form-control" id="name" name="name" autocomplete="off"> <input type="text" class=" form-control" id="userNm" name="userNm" autocomplete="off">
</div> </div>
</div> </div>
<div class="mb-3 row"> <div class="mb-3 row">