19 declare(strict_types=1);
    40     public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 
""): bool
    43         $ilAccess = $DIC[
'ilAccess'];
    44         switch ($a_permission) {
    48                 if (!$target_ref_id || !$ilAccess->checkAccessOfUser($a_user_id, $a_permission, $a_cmd, $target_ref_id)) {
    54                 if (!$ilAccess->checkAccessOfUser($a_user_id, $a_permission, $a_cmd, $a_ref_id)) {
    60                 $target_id = $prg->getId();
    61                 $parent = $tree->getParentNodeData($a_ref_id);
    62                 if ($parent[
"type"] === 
"prg" && !$parent[
"deleted"]) {
    64                     if (! $parent->canBeRemoved()) {
    78         $ilAccess = $DIC->access();
    84         if ($ilAccess->checkAccess(
'write', 
'', $a_ref_id)) {
    85             $commands[] = [
"permission" => 
"write", 
"cmd" => 
"editReference", 
"lang_var" => 
"edit"];
    87         if ($ilAccess->checkAccess(
'read', 
'', $target_ref_id)) {
    88             $commands[] = array(
'permission' => 
'visible', 
'cmd' => 
'view', 
'lang_var' => 
'show', 
'default' => 
true);
 
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcc...
 
static getInstanceByRefId($ref_id)
 
static _lookupObjId(int $ref_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _lookupTargetRefId(int $a_obj_id)
 
static _getCommands(int $a_ref_id=null)