Skip to content

Commit e4dbb70

Browse files
[Fix] Repository: Prevent duplicate non-deletable ref_ids (ILIAS-eLearning#11147)
1 parent b7391e2 commit e4dbb70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/ILIAS/Repository/Deletion/PermissionStandardAdapter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function getRefIdsWithoutDeletePermission(array $ids): array
4141
if (!$this->access->checkAccess('delete', "", $id)) {
4242
$not_deletable[] = (int) $id;
4343
}
44+
4445
if ($this->tree->isInTree($id)) {
4546
$node_data = $this->tree->getNodeData($id);
4647
$subtree_nodes = $this->tree->getSubTree($node_data);
@@ -55,7 +56,8 @@ public function getRefIdsWithoutDeletePermission(array $ids): array
5556
}
5657
}
5758
}
58-
return $not_deletable;
59+
60+
return array_unique($not_deletable);
5961
}
6062

6163
public function revokePermission(int $ref_id): void

0 commit comments

Comments
 (0)