Skip to content

Commit 4486a49

Browse files
committed
Fix permissions removal for shared tables
1 parent 0dffc8e commit 4486a49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@ public function createOrUpdateDocuments(
14451445
if (!empty($toRemove)) {
14461446
$removeQueries[] = "(
14471447
_document = :_uid_{$index}
1448-
{$this->getTenantQuery($collection, tenantCount: \count($toRemove))}
1448+
" . ($this->sharedTables ? " AND _tenant = :_tenant_{$index}" : '') . "
14491449
AND _type = '{$type}'
14501450
AND _permission IN (" . \implode(',', \array_map(fn ($i) => ":remove_{$type}_{$index}_{$i}", \array_keys($toRemove))) . ")
14511451
)";

0 commit comments

Comments
 (0)