[Developer] #424 hide orphan protected objects in permission picker

This commit is contained in:
devmrko
2026-06-25 14:11:13 +09:00
parent 0a48273b6d
commit 30bd12c9a5
8 changed files with 73 additions and 1 deletions

View File

@@ -84,6 +84,20 @@
AND o.object_id = #{objectId}
</select>
<select id="findObjectIdByPermissionId" resultType="long">
SELECT o.object_id
FROM cb_permission p
JOIN cb_protected_object o ON o.object_name = p.target_name
WHERE p.perm_id = #{permissionId}
</select>
<select id="countPermissionsByObjectId" resultType="int">
SELECT COUNT(*)
FROM cb_permission p
JOIN cb_protected_object o ON o.object_name = p.target_name
WHERE o.object_id = #{objectId}
</select>
<select id="findPermissionSet" resultType="com.cloudhandson.vpdbackoffice.domain.permission.PermissionSet">
SELECT p.perm_id AS permission_id,
p.role_id,