19declare(strict_types=1);
40 foreach ($ids as
$id) {
41 if (!$this->
access->checkAccess(
'delete',
"", $id)) {
42 $not_deletable[] = (
int)
$id;
45 if ($this->tree->isInTree(
$id)) {
46 $node_data = $this->tree->getNodeData(
$id);
47 $subtree_nodes = $this->tree->getSubTree($node_data);
49 foreach ($subtree_nodes as $node) {
50 if ($node[
'type'] ===
'rolf') {
53 if (!$this->
access->checkAccess(
'delete',
"", $node[
"child"])) {
54 $not_deletable[] = (
int) $node[
"child"];
60 return array_unique($not_deletable);
65 $this->rbacadmin->revokePermission(
$ref_id);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
checkAccess(string $operation, int $ref_id)
getRefIdsWithoutDeletePermission(array $ids)
__construct(protected \ilAccess $access, protected \ilRbacAdmin $rbacadmin, protected TreeInterface $tree)
revokePermission(int $ref_id)
Class ilAccessHandler Checks access for ILIAS objects.
Class ilRbacAdmin Core functions for role based access control.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...