feat(backoffice): retain access policy with Smilegate tables
This commit is contained in:
@@ -79,6 +79,57 @@ begin
|
|||||||
created_at timestamp default systimestamp not null
|
created_at timestamp default systimestamp not null
|
||||||
)');
|
)');
|
||||||
create_if_missing('create sequence sg_audit_event_seq start with 1 increment by 1 nocache');
|
create_if_missing('create sequence sg_audit_event_seq start with 1 increment by 1 nocache');
|
||||||
|
create_if_missing('create table sg_protected_object (
|
||||||
|
object_id number primary key,
|
||||||
|
owner varchar2(128) not null,
|
||||||
|
object_name varchar2(128) not null,
|
||||||
|
ords_path varchar2(500),
|
||||||
|
enabled_yn char(1) default ''Y'' not null,
|
||||||
|
description varchar2(500),
|
||||||
|
created_at timestamp default systimestamp not null,
|
||||||
|
updated_at timestamp default systimestamp not null,
|
||||||
|
constraint sg_protected_object_uq unique (owner, object_name),
|
||||||
|
constraint sg_protected_object_enabled_ck check (enabled_yn in (''Y'', ''N''))
|
||||||
|
)');
|
||||||
|
create_if_missing('create table sg_protected_column (
|
||||||
|
column_id number primary key,
|
||||||
|
object_id number not null,
|
||||||
|
column_name varchar2(128) not null,
|
||||||
|
sensitive_yn char(1) default ''N'' not null,
|
||||||
|
visible_role_id number,
|
||||||
|
sensitivity_level varchar2(30) default ''PUBLIC'' not null,
|
||||||
|
redaction_method varchar2(30) default ''NONE'' not null,
|
||||||
|
constraint sg_protected_column_uq unique (object_id, column_name),
|
||||||
|
constraint sg_protected_column_object_fk foreign key (object_id) references sg_protected_object(object_id),
|
||||||
|
constraint sg_protected_column_role_fk foreign key (visible_role_id) references sg_app_role(role_id)
|
||||||
|
)');
|
||||||
|
create_if_missing('create table sg_permission (
|
||||||
|
perm_id number primary key,
|
||||||
|
role_id number not null,
|
||||||
|
target_name varchar2(128) not null,
|
||||||
|
action_name varchar2(30) not null,
|
||||||
|
permission_effect varchar2(30) default ''ALLOW'' not null,
|
||||||
|
created_at timestamp default systimestamp not null,
|
||||||
|
updated_at timestamp default systimestamp not null,
|
||||||
|
constraint sg_permission_role_fk foreign key (role_id) references sg_app_role(role_id),
|
||||||
|
constraint sg_permission_effect_ck check (permission_effect in (''ALLOW'', ''DENY''))
|
||||||
|
)');
|
||||||
|
create_if_missing('create table sg_permission_rule (
|
||||||
|
rule_id number primary key,
|
||||||
|
perm_id number not null,
|
||||||
|
rule_column varchar2(128),
|
||||||
|
rule_type varchar2(50) not null,
|
||||||
|
rule_value varchar2(2000),
|
||||||
|
constraint sg_permission_rule_perm_fk foreign key (perm_id) references sg_permission(perm_id)
|
||||||
|
)');
|
||||||
|
create_if_missing('create table sg_permission_column (
|
||||||
|
permission_id number not null,
|
||||||
|
column_name varchar2(128) not null,
|
||||||
|
constraint sg_permission_column_pk primary key (permission_id, column_name),
|
||||||
|
constraint sg_permission_column_perm_fk foreign key (permission_id) references sg_permission(perm_id)
|
||||||
|
)');
|
||||||
|
create_if_missing('create sequence sg_permission_seq start with 1 increment by 1 nocache');
|
||||||
|
create_if_missing('create sequence sg_permission_rule_seq start with 1 increment by 1 nocache');
|
||||||
end;
|
end;
|
||||||
/
|
/
|
||||||
|
|
||||||
|
|||||||
@@ -59,44 +59,52 @@
|
|||||||
|
|
||||||
<select id="countPermissionsByRoleId" resultType="int">
|
<select id="countPermissionsByRoleId" resultType="int">
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM dual
|
FROM sg_permission
|
||||||
WHERE 1 = 0
|
WHERE role_id = #{roleId,jdbcType=NUMERIC}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findPermissionViews" resultType="com.cloudhandson.vpdbackoffice.domain.permission.PermissionView">
|
<select id="findPermissionViews" resultType="com.cloudhandson.vpdbackoffice.domain.permission.PermissionView">
|
||||||
SELECT CAST(NULL AS NUMBER) AS permission_id,
|
SELECT p.perm_id AS permission_id,
|
||||||
CAST(NULL AS NUMBER) AS role_id,
|
r.role_id,
|
||||||
CAST(NULL AS VARCHAR2(100)) AS role_name,
|
r.role_name,
|
||||||
CAST(NULL AS NUMBER) AS object_id,
|
NVL(o.object_id, -1) AS object_id,
|
||||||
CAST(NULL AS VARCHAR2(200)) AS object_name,
|
p.target_name AS object_name,
|
||||||
CAST(NULL AS VARCHAR2(30)) AS action,
|
p.action_name AS action,
|
||||||
CAST(NULL AS VARCHAR2(30)) AS permission_effect,
|
NVL(p.permission_effect, 'ALLOW') AS permission_effect,
|
||||||
CAST(NULL AS VARCHAR2(4000)) AS rules,
|
LISTAGG(NVL2(pr.rule_column, pr.rule_column || ' ', '') || pr.rule_type || NVL2(pr.rule_value, ' ' || pr.rule_value, ''), ', ')
|
||||||
CAST(NULL AS VARCHAR2(4000)) AS visible_columns,
|
WITHIN GROUP (ORDER BY pr.rule_id) AS rules,
|
||||||
CAST(NULL AS VARCHAR2(4000)) AS filter_preview,
|
(SELECT LISTAGG(pc.column_name, ', ') WITHIN GROUP (ORDER BY pc.column_name)
|
||||||
CAST(NULL AS VARCHAR2(4000)) AS null_policy_preview
|
FROM sg_permission_column pc WHERE pc.permission_id = p.perm_id) AS visible_columns,
|
||||||
FROM dual WHERE 1 = 0
|
(SELECT LISTAGG(NVL2(pr2.rule_column, pr2.rule_column || ' ', '') || pr2.rule_type || NVL2(pr2.rule_value, ' ' || pr2.rule_value, ''), CHR(10) || 'AND ')
|
||||||
|
WITHIN GROUP (ORDER BY pr2.rule_id) FROM sg_permission_rule pr2 WHERE pr2.perm_id = p.perm_id) AS filter_preview,
|
||||||
|
'Game-data access policy' AS null_policy_preview
|
||||||
|
FROM sg_permission p
|
||||||
|
JOIN sg_app_role r ON r.role_id = p.role_id
|
||||||
|
LEFT JOIN sg_protected_object o ON o.object_name = p.target_name
|
||||||
|
LEFT JOIN sg_permission_rule pr ON pr.perm_id = p.perm_id
|
||||||
|
GROUP BY p.perm_id, r.role_id, r.role_name, o.object_id, p.target_name, p.action_name, p.permission_effect
|
||||||
|
ORDER BY r.role_name, p.target_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findPermissionId" resultType="long">
|
<select id="findPermissionId" resultType="long">
|
||||||
SELECT p.perm_id
|
SELECT p.perm_id
|
||||||
FROM cb_permission p
|
FROM sg_permission p
|
||||||
JOIN cb_protected_object o ON o.object_name = p.target_name
|
JOIN sg_protected_object o ON o.object_name = p.target_name
|
||||||
WHERE p.role_id = #{roleId}
|
WHERE p.role_id = #{roleId}
|
||||||
AND o.object_id = #{objectId}
|
AND o.object_id = #{objectId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findObjectIdByPermissionId" resultType="long">
|
<select id="findObjectIdByPermissionId" resultType="long">
|
||||||
SELECT o.object_id
|
SELECT o.object_id
|
||||||
FROM cb_permission p
|
FROM sg_permission p
|
||||||
JOIN cb_protected_object o ON o.object_name = p.target_name
|
JOIN sg_protected_object o ON o.object_name = p.target_name
|
||||||
WHERE p.perm_id = #{permissionId}
|
WHERE p.perm_id = #{permissionId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countPermissionsByObjectId" resultType="int">
|
<select id="countPermissionsByObjectId" resultType="int">
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM cb_permission p
|
FROM sg_permission p
|
||||||
JOIN cb_protected_object o ON o.object_name = p.target_name
|
JOIN sg_protected_object o ON o.object_name = p.target_name
|
||||||
WHERE o.object_id = #{objectId}
|
WHERE o.object_id = #{objectId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -106,46 +114,46 @@
|
|||||||
o.object_id,
|
o.object_id,
|
||||||
p.action_name AS action,
|
p.action_name AS action,
|
||||||
NVL(p.permission_effect, 'ALLOW') AS permission_effect
|
NVL(p.permission_effect, 'ALLOW') AS permission_effect
|
||||||
FROM cb_permission p
|
FROM sg_permission p
|
||||||
JOIN cb_protected_object o ON o.object_name = p.target_name
|
JOIN sg_protected_object o ON o.object_name = p.target_name
|
||||||
WHERE p.role_id = #{roleId}
|
WHERE p.role_id = #{roleId}
|
||||||
AND o.object_id = #{objectId}
|
AND o.object_id = #{objectId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="nextPermissionId" resultType="long">
|
<select id="nextPermissionId" resultType="long">
|
||||||
SELECT cb_permission_seq.NEXTVAL FROM dual
|
SELECT sg_permission_seq.NEXTVAL FROM dual
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="nextRuleId" resultType="long">
|
<select id="nextRuleId" resultType="long">
|
||||||
SELECT cb_permission_rule_seq.NEXTVAL FROM dual
|
SELECT sg_permission_rule_seq.NEXTVAL FROM dual
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertPermission">
|
<insert id="insertPermission">
|
||||||
INSERT INTO cb_permission (perm_id, role_id, target_name, action_name, permission_effect)
|
INSERT INTO sg_permission (perm_id, role_id, target_name, action_name, permission_effect)
|
||||||
SELECT #{permissionId}, #{roleId}, object_name, #{action}, #{permissionEffect}
|
SELECT #{permissionId}, #{roleId}, object_name, #{action}, #{permissionEffect}
|
||||||
FROM cb_protected_object
|
FROM sg_protected_object
|
||||||
WHERE object_id = #{objectId}
|
WHERE object_id = #{objectId}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updatePermissionAction">
|
<update id="updatePermissionAction">
|
||||||
UPDATE cb_permission
|
UPDATE sg_permission
|
||||||
SET action_name = #{action}
|
SET action_name = #{action}
|
||||||
WHERE perm_id = #{permissionId}
|
WHERE perm_id = #{permissionId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updatePermissionEffect">
|
<update id="updatePermissionEffect">
|
||||||
UPDATE cb_permission
|
UPDATE sg_permission
|
||||||
SET permission_effect = #{permissionEffect}
|
SET permission_effect = #{permissionEffect}
|
||||||
WHERE perm_id = #{permissionId}
|
WHERE perm_id = #{permissionId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteRules">
|
<delete id="deleteRules">
|
||||||
DELETE FROM cb_permission_rule
|
DELETE FROM sg_permission_rule
|
||||||
WHERE perm_id = #{permissionId}
|
WHERE perm_id = #{permissionId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertRule" parameterType="com.cloudhandson.vpdbackoffice.domain.permission.PermissionRule">
|
<insert id="insertRule" parameterType="com.cloudhandson.vpdbackoffice.domain.permission.PermissionRule">
|
||||||
INSERT INTO cb_permission_rule (rule_id, perm_id, rule_column, rule_type, rule_value)
|
INSERT INTO sg_permission_rule (rule_id, perm_id, rule_column, rule_type, rule_value)
|
||||||
VALUES (
|
VALUES (
|
||||||
#{ruleId,jdbcType=NUMERIC},
|
#{ruleId,jdbcType=NUMERIC},
|
||||||
#{permissionId,jdbcType=NUMERIC},
|
#{permissionId,jdbcType=NUMERIC},
|
||||||
@@ -156,17 +164,17 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteVisibleColumns">
|
<delete id="deleteVisibleColumns">
|
||||||
DELETE FROM cb_permission_column
|
DELETE FROM sg_permission_column
|
||||||
WHERE permission_id = #{permissionId}
|
WHERE permission_id = #{permissionId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertVisibleColumn">
|
<insert id="insertVisibleColumn">
|
||||||
INSERT INTO cb_permission_column (permission_id, column_name)
|
INSERT INTO sg_permission_column (permission_id, column_name)
|
||||||
VALUES (#{permissionId}, #{columnName})
|
VALUES (#{permissionId}, #{columnName})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deletePermission">
|
<delete id="deletePermission">
|
||||||
DELETE FROM cb_permission
|
DELETE FROM sg_permission
|
||||||
WHERE perm_id = #{permissionId}
|
WHERE perm_id = #{permissionId}
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -4,28 +4,28 @@
|
|||||||
<mapper namespace="com.cloudhandson.vpdbackoffice.mapper.ProtectedObjectMapper">
|
<mapper namespace="com.cloudhandson.vpdbackoffice.mapper.ProtectedObjectMapper">
|
||||||
<select id="findEnabled" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
<select id="findEnabled" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
||||||
SELECT object_id, owner, object_name, ords_path, enabled_yn, description
|
SELECT object_id, owner, object_name, ords_path, enabled_yn, description
|
||||||
FROM cb_protected_object
|
FROM sg_protected_object
|
||||||
WHERE enabled_yn = 'Y'
|
WHERE enabled_yn = 'Y'
|
||||||
ORDER BY owner, object_name
|
ORDER BY owner, object_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findEnabledWithPermissions" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
<select id="findEnabledWithPermissions" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
||||||
SELECT DISTINCT po.object_id, po.owner, po.object_name, po.ords_path, po.enabled_yn, po.description
|
SELECT DISTINCT po.object_id, po.owner, po.object_name, po.ords_path, po.enabled_yn, po.description
|
||||||
FROM cb_protected_object po
|
FROM sg_protected_object po
|
||||||
JOIN cb_permission p ON p.target_name = po.object_name
|
JOIN sg_permission p ON p.target_name = po.object_name
|
||||||
WHERE po.enabled_yn = 'Y'
|
WHERE po.enabled_yn = 'Y'
|
||||||
ORDER BY po.owner, po.object_name
|
ORDER BY po.owner, po.object_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findById" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
<select id="findById" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
||||||
SELECT object_id, owner, object_name, ords_path, enabled_yn, description
|
SELECT object_id, owner, object_name, ords_path, enabled_yn, description
|
||||||
FROM cb_protected_object
|
FROM sg_protected_object
|
||||||
WHERE object_id = #{objectId}
|
WHERE object_id = #{objectId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findByOwnerAndName" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
<select id="findByOwnerAndName" resultType="com.cloudhandson.vpdbackoffice.domain.protectedobject.ProtectedObject">
|
||||||
SELECT object_id, owner, object_name, ords_path, enabled_yn, description
|
SELECT object_id, owner, object_name, ords_path, enabled_yn, description
|
||||||
FROM cb_protected_object
|
FROM sg_protected_object
|
||||||
WHERE owner = UPPER(#{owner,jdbcType=VARCHAR})
|
WHERE owner = UPPER(#{owner,jdbcType=VARCHAR})
|
||||||
AND object_name = UPPER(#{objectName,jdbcType=VARCHAR})
|
AND object_name = UPPER(#{objectName,jdbcType=VARCHAR})
|
||||||
</select>
|
</select>
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
AND object_name NOT LIKE 'BIN$%'
|
AND object_name NOT LIKE 'BIN$%'
|
||||||
AND NOT EXISTS (
|
AND NOT EXISTS (
|
||||||
SELECT 1
|
SELECT 1
|
||||||
FROM cb_protected_object po
|
FROM sg_protected_object po
|
||||||
JOIN cb_permission p ON p.target_name = po.object_name
|
JOIN sg_permission p ON p.target_name = po.object_name
|
||||||
WHERE po.owner = all_objects.owner
|
WHERE po.owner = all_objects.owner
|
||||||
AND po.object_name = all_objects.object_name
|
AND po.object_name = all_objects.object_name
|
||||||
AND po.enabled_yn = 'Y'
|
AND po.enabled_yn = 'Y'
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
visible_role_id,
|
visible_role_id,
|
||||||
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
||||||
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
||||||
FROM cb_protected_column
|
FROM sg_protected_column
|
||||||
WHERE object_id = #{objectId}
|
WHERE object_id = #{objectId}
|
||||||
ORDER BY column_id
|
ORDER BY column_id
|
||||||
</select>
|
</select>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
visible_role_id,
|
visible_role_id,
|
||||||
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
||||||
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
||||||
FROM cb_protected_column
|
FROM sg_protected_column
|
||||||
WHERE object_id IN
|
WHERE object_id IN
|
||||||
<foreach collection="objectIds" item="objectId" open="(" separator="," close=")">
|
<foreach collection="objectIds" item="objectId" open="(" separator="," close=")">
|
||||||
#{objectId,jdbcType=NUMERIC}
|
#{objectId,jdbcType=NUMERIC}
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
visible_role_id,
|
visible_role_id,
|
||||||
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
||||||
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
||||||
FROM cb_protected_column
|
FROM sg_protected_column
|
||||||
WHERE column_id = #{columnId}
|
WHERE column_id = #{columnId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -105,21 +105,21 @@
|
|||||||
visible_role_id,
|
visible_role_id,
|
||||||
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
NVL(sensitivity_level, CASE sensitive_yn WHEN 'Y' THEN 'CONFIDENTIAL' ELSE 'PUBLIC' END) AS sensitivity_level,
|
||||||
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
NVL(redaction_method, CASE sensitive_yn WHEN 'Y' THEN 'NULLIFY' ELSE 'NONE' END) AS redaction_method
|
||||||
FROM cb_protected_column
|
FROM sg_protected_column
|
||||||
WHERE object_id = #{objectId}
|
WHERE object_id = #{objectId}
|
||||||
AND column_name = UPPER(#{columnName,jdbcType=VARCHAR})
|
AND column_name = UPPER(#{columnName,jdbcType=VARCHAR})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="nextObjectId" resultType="long">
|
<select id="nextObjectId" resultType="long">
|
||||||
SELECT NVL(MAX(object_id), 0) + 1 FROM cb_protected_object
|
SELECT NVL(MAX(object_id), 0) + 1 FROM sg_protected_object
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="nextColumnId" resultType="long">
|
<select id="nextColumnId" resultType="long">
|
||||||
SELECT NVL(MAX(column_id), 0) + 1 FROM cb_protected_column
|
SELECT NVL(MAX(column_id), 0) + 1 FROM sg_protected_column
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertObject">
|
<insert id="insertObject">
|
||||||
INSERT INTO cb_protected_object (object_id, owner, object_name, ords_path, enabled_yn, description)
|
INSERT INTO sg_protected_object (object_id, owner, object_name, ords_path, enabled_yn, description)
|
||||||
VALUES (
|
VALUES (
|
||||||
#{objectId},
|
#{objectId},
|
||||||
UPPER(#{command.owner}),
|
UPPER(#{command.owner}),
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertColumn">
|
<insert id="insertColumn">
|
||||||
INSERT INTO cb_protected_column (
|
INSERT INTO sg_protected_column (
|
||||||
column_id, object_id, column_name, sensitive_yn, sensitivity_level, redaction_method
|
column_id, object_id, column_name, sensitive_yn, sensitivity_level, redaction_method
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateColumnPolicy">
|
<update id="updateColumnPolicy">
|
||||||
UPDATE cb_protected_column
|
UPDATE sg_protected_column
|
||||||
SET sensitivity_level = #{sensitivityLevel,jdbcType=VARCHAR},
|
SET sensitivity_level = #{sensitivityLevel,jdbcType=VARCHAR},
|
||||||
redaction_method = #{redactionMethod,jdbcType=VARCHAR},
|
redaction_method = #{redactionMethod,jdbcType=VARCHAR},
|
||||||
sensitive_yn = CASE
|
sensitive_yn = CASE
|
||||||
@@ -152,25 +152,25 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateOrdsPath">
|
<update id="updateOrdsPath">
|
||||||
UPDATE cb_protected_object
|
UPDATE sg_protected_object
|
||||||
SET ords_path = #{ordsPath,jdbcType=VARCHAR}
|
SET ords_path = #{ordsPath,jdbcType=VARCHAR}
|
||||||
WHERE object_id = #{objectId,jdbcType=NUMERIC}
|
WHERE object_id = #{objectId,jdbcType=NUMERIC}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateDescription">
|
<update id="updateDescription">
|
||||||
UPDATE cb_protected_object
|
UPDATE sg_protected_object
|
||||||
SET description = #{description,jdbcType=VARCHAR}
|
SET description = #{description,jdbcType=VARCHAR}
|
||||||
WHERE object_id = #{objectId,jdbcType=NUMERIC}
|
WHERE object_id = #{objectId,jdbcType=NUMERIC}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="enableObject">
|
<update id="enableObject">
|
||||||
UPDATE cb_protected_object
|
UPDATE sg_protected_object
|
||||||
SET enabled_yn = 'Y'
|
SET enabled_yn = 'Y'
|
||||||
WHERE object_id = #{objectId}
|
WHERE object_id = #{objectId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="disableObject">
|
<update id="disableObject">
|
||||||
UPDATE cb_protected_object
|
UPDATE sg_protected_object
|
||||||
SET enabled_yn = 'N'
|
SET enabled_yn = 'N'
|
||||||
WHERE object_id = #{objectId}
|
WHERE object_id = #{objectId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user