86 lines
3.4 KiB
HTML
86 lines
3.4 KiB
HTML
<!doctype html>
|
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
|
<head th:replace="~{fragments/layout :: head('역할 관리')}"></head>
|
|
<body>
|
|
<nav th:replace="~{fragments/layout :: nav}"></nav>
|
|
<main class="container py-4">
|
|
<div class="page-title">
|
|
<h1>역할 관리</h1>
|
|
<p>사용자에게 부여할 역할을 관리합니다.</p>
|
|
</div>
|
|
|
|
<div class="alert alert-success" th:if="${message}" th:text="${message}"></div>
|
|
|
|
<section class="content-band">
|
|
<h2>역할 추가</h2>
|
|
<form method="post" action="/roles" class="form-grid">
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
|
<label>
|
|
역할명
|
|
<input class="form-control" name="roleName" placeholder="HR_DEPT_ROLE" required>
|
|
</label>
|
|
<label>
|
|
설명
|
|
<input class="form-control" name="description" maxlength="200">
|
|
</label>
|
|
<label>
|
|
민감도 허용 상한
|
|
<select class="form-select" name="maxSensitivityLevel">
|
|
<option value="PUBLIC">PUBLIC</option>
|
|
<option value="INTERNAL">INTERNAL</option>
|
|
<option value="CONFIDENTIAL">CONFIDENTIAL</option>
|
|
<option value="RESTRICTED">RESTRICTED</option>
|
|
</select>
|
|
</label>
|
|
<button class="btn rw-btn-primary" type="submit">추가</button>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="content-band">
|
|
<h2>역할 목록</h2>
|
|
<div class="table-responsive">
|
|
<table class="table table-sm align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>역할명</th>
|
|
<th>민감도 허용 상한</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="role : ${roles}">
|
|
<td th:text="${role.roleId()}">10</td>
|
|
<td th:text="${role.roleName()}">HR_DEPT_ROLE</td>
|
|
<td>
|
|
<form method="post" action="/roles/max-sensitivity" class="inline-form">
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
|
<input type="hidden" name="roleId" th:value="${role.roleId()}">
|
|
<select class="form-select form-select-sm" name="maxSensitivityLevel">
|
|
<option value="PUBLIC" th:selected="${role.maxSensitivityLevel() == 'PUBLIC'}">PUBLIC</option>
|
|
<option value="INTERNAL" th:selected="${role.maxSensitivityLevel() == 'INTERNAL'}">INTERNAL</option>
|
|
<option value="CONFIDENTIAL" th:selected="${role.maxSensitivityLevel() == 'CONFIDENTIAL'}">CONFIDENTIAL</option>
|
|
<option value="RESTRICTED" th:selected="${role.maxSensitivityLevel() == 'RESTRICTED'}">RESTRICTED</option>
|
|
</select>
|
|
<button class="btn btn-sm btn-outline-primary" type="submit">저장</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form method="post" action="/roles/delete" class="inline-form">
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
|
<input type="hidden" name="roleId" th:value="${role.roleId()}">
|
|
<button class="btn btn-sm btn-outline-danger" type="submit">삭제</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<tr th:if="${#lists.isEmpty(roles)}">
|
|
<td colspan="4" class="text-muted">등록된 역할이 없습니다.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|