[Developer] #424 stop guessing protected object ORDS paths

This commit is contained in:
devmrko
2026-06-23 15:19:04 +09:00
parent a542a7b735
commit 0b43750a32
7 changed files with 59 additions and 36 deletions

View File

@@ -71,6 +71,12 @@
VALUES (#{columnId}, #{objectId}, UPPER(#{columnName}), #{sensitiveYn})
</insert>
<update id="updateOrdsPath">
UPDATE cb_protected_object
SET ords_path = #{ordsPath,jdbcType=VARCHAR}
WHERE object_id = #{objectId,jdbcType=NUMERIC}
</update>
<update id="disableObject">
UPDATE cb_protected_object
SET enabled_yn = 'N'

View File

@@ -76,8 +76,8 @@ async function syncObjectCatalogSelection() {
if (objectInput) {
objectInput.value = selected.dataset.objectName || '';
}
if (ordsPathInput) {
ordsPathInput.value = selected.dataset.defaultPath || '';
if (ordsPathInput && !ordsPathInput.value) {
ordsPathInput.focus();
}
if (!columnsInput) {
return;

View File

@@ -10,6 +10,7 @@
</div>
<div class="alert alert-success" th:if="${message}" th:text="${message}"></div>
<div class="alert alert-danger" th:if="${errorMessage}" th:text="${errorMessage}"></div>
<section class="content-band">
<h2>테이블/뷰 추가</h2>
@@ -23,7 +24,6 @@
th:value="${dbObject.value()}"
th:data-owner="${dbObject.owner()}"
th:data-object-name="${dbObject.objectName()}"
th:data-default-path="${dbObject.defaultOrdsPath()}"
th:text="${dbObject.label()}"></option>
</select>
</label>
@@ -37,7 +37,7 @@
</label>
<label>
ORDS Path
<input class="form-control" name="ordsPath" placeholder="admin/cb_v_search_documents">
<input class="form-control" name="ordsPath" placeholder="cb-ords/cb-agent-security/vpd/documents" required>
</label>
<label>
컬럼
@@ -69,7 +69,14 @@
<td th:text="${object.objectId()}">1</td>
<td th:text="${object.owner()}">ADMIN</td>
<td th:text="${object.objectName()}">CB_V_SEARCH_DOCUMENTS</td>
<td><code th:text="${object.ordsPath()}">path</code></td>
<td>
<form method="post" action="/objects/ords-path" class="inline-form">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
<input type="hidden" name="objectId" th:value="${object.objectId()}">
<input class="form-control form-control-sm" name="ordsPath" th:value="${object.ordsPath()}" required>
<button class="btn btn-sm btn-outline-primary" type="submit">저장</button>
</form>
</td>
<td>
<form method="post" action="/objects/disable" class="inline-form">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">