Skip to content

Commit 35ddaeb

Browse files
authored
fix minor Grant CRD reconciler service inconsistency (#35)
1 parent f42390b commit 35ddaeb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

operator/src/main/java/it/aboutbits/postgresql/crd/grant/GrantService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public Map<String, Set<Privilege>> determineCurrentObjectPrivileges(
312312
OID_DATA_TYPE,
313313
val(schema)
314314
)),
315-
objects.isEmpty() ? noCondition() : PG_CLASS.RELNAME.in(objects),
315+
isAllMode ? noCondition() : PG_CLASS.RELNAME.in(objects),
316316
// See https://www.postgresql.org/docs/current/catalog-pg-class.html#CATALOG-PG-CLASS
317317
PG_CLASS.RELKIND.in(
318318
"r", // Ordinary Table
@@ -324,7 +324,7 @@ public Map<String, Set<Privilege>> determineCurrentObjectPrivileges(
324324
)
325325
.fetchMap(PG_CLASS.RELNAME, isOwnerCondition);
326326

327-
if (objects.isEmpty()) {
327+
if (isAllMode) {
328328
objectExistenceAndOwnershipMap.putAll(existingObjectsOwner);
329329
} else {
330330
for (var object : objects) {

0 commit comments

Comments
 (0)