[DBA] add KB VPD admin full access condition

This commit is contained in:
devmrko
2026-07-08 13:02:11 +09:00
parent fbeb18ccec
commit 403298d474
5 changed files with 236 additions and 4 deletions

View File

@@ -281,6 +281,13 @@ public class PermissionService {
throw new AppException("정적 SQL 조건에는 다른 테이블·스키마를 참조할 수 없습니다.");
}
// The VPD function makes the same narrowly-scoped exception. It lets an
// administrator express the auditable physical condition "1 = 1" for a
// full-access permission instead of relying on an implicit ALL marker.
if (predicate.matches("(?i)^1\\s*=\\s*1$")) {
return;
}
boolean hasObjectColumn = false;
Matcher matcher = SQL_IDENTIFIER.matcher(lexical.toUpperCase(Locale.ROOT));
while (matcher.find()) {