101 lines
3.6 KiB
HTML
101 lines
3.6 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="/permissions" class="form-grid">
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
|
<label>
|
|
역할
|
|
<select class="form-select" name="roleId" required>
|
|
<option th:each="role : ${roles}" th:value="${role.roleId()}" th:text="${role.roleName()}"></option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
보호 객체
|
|
<select class="form-select" name="objectRef" required>
|
|
<optgroup label="등록된 보호 객체">
|
|
<option th:each="object : ${objects}"
|
|
th:value="${'protected:' + object.objectId()}"
|
|
th:text="${object.displayName()}"></option>
|
|
</optgroup>
|
|
<optgroup label="DB 스키마 객체">
|
|
<option th:each="dbObject : ${dbObjects}"
|
|
th:value="${'db:' + dbObject.value()}"
|
|
th:text="${dbObject.label()}"></option>
|
|
</optgroup>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
행 규칙
|
|
<select class="form-select" name="ruleType">
|
|
<option value="ALL">ALL</option>
|
|
<option value="REGION">REGION</option>
|
|
<option value="MY_DEPT">MY_DEPT</option>
|
|
<option value="SELF">SELF</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
규칙 값
|
|
<input class="form-control" name="ruleValue" placeholder="APAC 또는 HR">
|
|
</label>
|
|
<label>
|
|
NULL 제외 컬럼
|
|
<input class="form-control" name="visibleColumns" placeholder="CONTENTS">
|
|
</label>
|
|
<button class="btn 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>Action</th>
|
|
<th>행 규칙</th>
|
|
<th>NULL 제외 컬럼</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="permission : ${permissions}">
|
|
<td th:text="${permission.permissionId()}">100</td>
|
|
<td th:text="${permission.roleName()}">HR_DEPT_ROLE</td>
|
|
<td th:text="${permission.objectName()}">CB_V_SEARCH_DOCUMENTS</td>
|
|
<td th:text="${permission.action()}">SELECT</td>
|
|
<td th:text="${permission.rules()} ?: '-'">ALL</td>
|
|
<td th:text="${permission.visibleColumns()} ?: '-'">CONTENTS</td>
|
|
<td>
|
|
<form method="post" action="/permissions/delete" class="inline-form">
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
|
<input type="hidden" name="permissionId" th:value="${permission.permissionId()}">
|
|
<button class="btn btn-sm btn-outline-danger" type="submit">삭제</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<tr th:if="${#lists.isEmpty(permissions)}">
|
|
<td colspan="7" class="text-muted">등록된 권한이 없습니다.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|