@@ -16,6 +16,7 @@
|
||||
<a class="navbar-brand" href="/">VPD Backoffice</a>
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link" href="/users">사용자</a>
|
||||
<a class="nav-link" href="/roles">역할</a>
|
||||
<a class="nav-link" href="/permissions">권한</a>
|
||||
<a class="nav-link" href="/objects">테이블/뷰</a>
|
||||
<a class="nav-link" href="/tokens">토큰</a>
|
||||
|
||||
@@ -23,8 +23,17 @@
|
||||
</label>
|
||||
<label>
|
||||
보호 객체
|
||||
<select class="form-select" name="objectId" required>
|
||||
<option th:each="object : ${objects}" th:value="${object.objectId()}" th:text="${object.displayName()}"></option>
|
||||
<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>
|
||||
@@ -41,7 +50,7 @@
|
||||
<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>
|
||||
@@ -59,7 +68,7 @@
|
||||
<th>테이블/뷰</th>
|
||||
<th>Action</th>
|
||||
<th>행 규칙</th>
|
||||
<th>표시 컬럼</th>
|
||||
<th>NULL 제외 컬럼</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -12,20 +12,16 @@
|
||||
<section class="content-band">
|
||||
<form hx-post="/probe" hx-target="#probe-result" hx-swap="innerHTML" class="form-grid">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<label>
|
||||
Token ID
|
||||
<select class="form-select" name="keyId" required>
|
||||
<option th:each="token : ${tokens}" th:value="${token.keyId()}" th:text="${token.keyPrefix()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Bearer Token 원문
|
||||
<input class="form-control" name="bearerToken" type="password" autocomplete="off" required>
|
||||
</label>
|
||||
<label>
|
||||
보호 객체
|
||||
ORDS 트랙
|
||||
<select class="form-select" name="objectId" required>
|
||||
<option th:each="object : ${objects}" th:value="${object.objectId()}" th:text="${object.displayName()}"></option>
|
||||
<option th:each="object : ${objects}"
|
||||
th:value="${object.objectId()}"
|
||||
th:text="${object.displayName() + ' / ' + object.ordsPath()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
|
||||
62
src/main/resources/templates/roles.html
Normal file
62
src/main/resources/templates/roles.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!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>
|
||||
<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>
|
||||
</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/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="3" class="text-muted">등록된 역할이 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -69,30 +69,30 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="content-band">
|
||||
<h2>역할 부여</h2>
|
||||
<form method="post" action="/users/roles" class="form-grid">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<label>
|
||||
사용자
|
||||
<select class="form-select" name="userId" required>
|
||||
<option th:each="user : ${users}" th:value="${user.userId()}" th:text="${user.username()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
역할
|
||||
<select class="form-select" name="roleId" required>
|
||||
<option th:each="role : ${roles}" th:value="${role.roleId()}" th:text="${role.roleName()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<button class="btn btn-primary" type="submit">부여</button>
|
||||
</form>
|
||||
</section>
|
||||
<section class="content-band user-role-master">
|
||||
<h2>사용자 역할 부여</h2>
|
||||
<div class="master-detail">
|
||||
<form method="post" action="/users/roles" class="form-grid">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<label>
|
||||
사용자
|
||||
<select class="form-select" id="userRoleMaster" name="userId" required>
|
||||
<option th:each="user : ${users}" th:value="${user.userId()}" th:text="${user.username()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
부여할 역할
|
||||
<select class="form-select" name="roleId" required>
|
||||
<option th:each="role : ${roles}" th:value="${role.roleId()}" th:text="${role.roleName()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<button class="btn rw-btn-primary" type="submit">부여</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<section class="content-band">
|
||||
<h2>사용자 역할 목록</h2>
|
||||
<h2 class="mt-4">선택 사용자 역할</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm align-middle">
|
||||
<table class="table table-sm align-middle" id="userRoleDetail">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>사용자</th>
|
||||
@@ -101,7 +101,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="mapping : ${userRoles}">
|
||||
<tr th:each="mapping : ${userRoles}" th:attr="data-user-id=${mapping.userId()}">
|
||||
<td th:text="${mapping.username()}">agent_hr</td>
|
||||
<td th:text="${mapping.roleName()}">HR_DEPT_ROLE</td>
|
||||
<td>
|
||||
@@ -113,7 +113,7 @@
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr th:if="${#lists.isEmpty(userRoles)}">
|
||||
<tr class="empty-user-role-row" th:if="${#lists.isEmpty(userRoles)}">
|
||||
<td colspan="3" class="text-muted">부여된 역할이 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user