19declare(strict_types=1);
46 $this->rbac_system = $rbac->
system();
47 $this->ref_id =
$http->wrapper()->query()->has(
'ref_id')
48 ?
$http->wrapper()->query()->retrieve(
'ref_id',
$refinery->kindlyTo()->int())
55 throw new \ilException(
'Permission denied');
61 if ($this->ref_id ===
null) {
65 $permissions = explode(
',', $permission);
66 foreach ($permissions as $p) {
67 if ($this->rbac_system->checkAccess($p, $this->ref_id)) {
68 $this->access_checked =
true;
72 $this->access_checked =
true;
78 if (!$this->access_checked) {
85 $this->require(
'read');
90 $this->require(
'write');
93 public function require(
string $permissions): void
Provides fluid interface to RBAC services.
system()
Get the interface to the RBAC system.
ilRbacSystem $rbac_system
checkAccessAndThrowException(string $permission)
__construct(RBACServices $rbac, Services $http, Factory $refinery,)
ilObjMainMenuAccess constructor.
hasUserPermissionTo(string $permission)