fix #424: add VPD policy registration form
This commit is contained in:
@@ -6,13 +6,84 @@
|
||||
<main class="container py-4">
|
||||
<div class="page-title">
|
||||
<h1>VPD 설정</h1>
|
||||
<p>ORDS 조회 Handler 대상에 등록된 보호 객체에 적용된 Oracle VPD policy 설정을 확인합니다.</p>
|
||||
<p>보호 객체에 Oracle VPD policy를 등록하고, policy function/filter predicate를 확인합니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning" th:if="${runtimeError}">
|
||||
<strong th:text="${runtimeError.title()}">조회할 수 없습니다.</strong>
|
||||
<span th:text="${runtimeError.message()}">message</span>
|
||||
</div>
|
||||
<div class="alert alert-success" th:if="${successMessage}" th:text="${successMessage}">등록되었습니다.</div>
|
||||
<div class="alert alert-danger" th:if="${errorMessage}" th:text="${errorMessage}">처리할 수 없습니다.</div>
|
||||
|
||||
<section class="content-band">
|
||||
<div class="section-heading">
|
||||
<h2>Policy 등록</h2>
|
||||
</div>
|
||||
<form method="post" action="/vpd-policies" class="form-grid">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<label>
|
||||
VPD 적용 대상
|
||||
<select class="form-select" name="objectKey" required>
|
||||
<option th:each="object : ${objects}"
|
||||
th:value="${object.owner() + '.' + object.objectName()}"
|
||||
th:text="${object.displayName() + ' / ' + object.ordsPath()}"></option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Policy 이름
|
||||
<input class="form-control" name="policyName" placeholder="예: BOARD_POSTS_POLICY" required>
|
||||
</label>
|
||||
<label>
|
||||
Function Owner
|
||||
<input class="form-control" name="functionOwner" placeholder="비우면 현재 연결 사용자">
|
||||
</label>
|
||||
<label>
|
||||
Function 이름
|
||||
<input class="form-control" name="functionName" placeholder="비우면 POLICY_NAME_FILTER 자동 생성">
|
||||
</label>
|
||||
<label>
|
||||
Statement Types
|
||||
<input class="form-control" name="statementTypes" value="SELECT" placeholder="SELECT,INSERT,UPDATE,DELETE">
|
||||
</label>
|
||||
<div class="form-check align-self-end">
|
||||
<input class="form-check-input" id="vpd-enabled" type="checkbox" name="enabled" value="true" checked>
|
||||
<label class="form-check-label" for="vpd-enabled">등록 즉시 활성화</label>
|
||||
</div>
|
||||
<div class="form-check span-2">
|
||||
<input class="form-check-input" id="vpd-update-check" type="checkbox" name="updateCheck" value="true">
|
||||
<label class="form-check-label" for="vpd-update-check">INSERT/UPDATE에도 predicate check 적용</label>
|
||||
</div>
|
||||
<label class="span-2">
|
||||
Filter predicate
|
||||
<textarea class="form-control" id="vpd-filter-predicate" name="filterPredicate" rows="4"
|
||||
placeholder="예: dept_code = SYS_CONTEXT(''CB_AGENT_CTX'', ''DEPT_CODE'') 비우면 기존 Function 이름으로 ADD_POLICY만 실행합니다."></textarea>
|
||||
</label>
|
||||
<div class="question-presets span-2" aria-label="Filter predicate 예시">
|
||||
<button class="btn rw-btn-secondary question-preset" type="button"
|
||||
data-target="vpd-filter-predicate"
|
||||
data-question="1=0">
|
||||
전체 차단
|
||||
</button>
|
||||
<button class="btn rw-btn-secondary question-preset" type="button"
|
||||
data-target="vpd-filter-predicate"
|
||||
data-question="1=1">
|
||||
전체 허용
|
||||
</button>
|
||||
<button class="btn rw-btn-secondary question-preset" type="button"
|
||||
data-target="vpd-filter-predicate"
|
||||
data-question="dept_code = SYS_CONTEXT('CB_AGENT_CTX', 'DEPT_CODE')">
|
||||
부서 일치
|
||||
</button>
|
||||
<button class="btn rw-btn-secondary question-preset" type="button"
|
||||
data-target="vpd-filter-predicate"
|
||||
data-question="owner_emp_no = SYS_CONTEXT('CB_AGENT_CTX', 'EMP_NO')">
|
||||
본인 소유
|
||||
</button>
|
||||
</div>
|
||||
<button class="btn rw-btn-primary" type="submit">Policy 등록</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="content-band">
|
||||
<div class="section-heading">
|
||||
@@ -106,5 +177,17 @@
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
document.querySelectorAll('.question-preset').forEach((button) => {
|
||||
button.addEventListener('click', () => {
|
||||
const target = document.getElementById(button.dataset.target || '');
|
||||
if (!target) {
|
||||
return;
|
||||
}
|
||||
target.value = button.dataset.question || '';
|
||||
target.focus();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user