33            array(
"permission" => 
"read", 
"cmd" => 
"render", 
"lang_var" => 
"show", 
"default" => 
true),
 
   34            array(
"permission" => 
"write", 
"cmd" => 
"listRecords", 
"lang_var" => 
"edit_content"),
 
   35            array(
"permission" => 
"write", 
"cmd" => 
"edit", 
"lang_var" => 
"settings"),
 
   48        $ilAccess = 
$DIC[
'ilAccess'];
 
   50        $t_arr = explode(
"_", $a_target);
 
   52        if ($t_arr[0] != 
"dcl" || ((
int) $t_arr[1]) <= 0) {
 
   56        if ($ilAccess->checkAccess(
"read", 
"", $t_arr[1]) ||
 
   57            $ilAccess->checkAccess(
"visible", 
"", $t_arr[1])) {
 
   74            if ($reference == $ref_id) {
 
   95    public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 
"")
 
  100        $rbacsystem = 
$DIC[
'rbacsystem'];
 
  101        $ilAccess = 
$DIC[
'ilAccess'];
 
  103        if ($a_user_id == 
"") {
 
  110                    && !$rbacsystem->checkAccessOfUser($a_user_id, 
'write', $a_ref_id)
 
  127        switch ($a_permission) {
 
  131                    && (!$rbacsystem->checkAccessOfUser($a_user_id, 
'write', $a_ref_id))
 
  154        $q = 
"SELECT * FROM il_dcl_data WHERE id = " . 
$ilDB->quote($a_id, 
"integer");
 
  155        $dcl_set = 
$ilDB->query($q);
 
  156        $dcl_rec = 
$ilDB->fetchAssoc($dcl_set);
 
  158        return $dcl_rec[
"is_online"];
 
  174        $ilAccess = 
$DIC[
'ilAccess'];
 
  179        if ($ilAccess->checkAccess(
"add_entry", 
"", array_shift($references))) {
 
  196            if (self::checkActionForRefId($action, $ref_id)) {
 
  211    public static function checkActionForRefId($action, $ref_id)
 
  214        $ilAccess = 
$DIC[
'ilAccess'];
 
  220        return $ilAccess->checkAccess($action, 
"", $ref_id);
 
  234        $ilAccess = 
$DIC[
'ilAccess'];
 
  237            return $ilAccess->checkAccessOfUser($user_id, 
"write", 
"", $ref);
 
  240        return $ilAccess->checkAccess(
"write", 
"", $ref);
 
  255        $ilAccess = 
$DIC[
'ilAccess'];
 
  258            return $ilAccess->checkAccessOfUser($user_id, 
"write", 
"", $ref);
 
  261        return $ilAccess->checkAccess(
"edit_content", 
"", $ref);
 
  274        $ilAccess = 
$DIC[
'ilAccess'];
 
  277            return $ilAccess->checkAccessOfUser($user_id, 
"write", 
"", $ref);
 
  280        return $ilAccess->checkAccess(
"add_entry", 
"", $ref);
 
  293        $ilAccess = 
$DIC[
'ilAccess'];
 
  296            return $ilAccess->checkAccessOfUser($user_id, 
"write", 
"", $ref);
 
  299        return $ilAccess->checkAccess(
"read", 
"", $ref);
 
  314        $rbacreview = 
$DIC[
'rbacreview'];
 
  320        if (is_numeric($tableview)) {
 
  321            $tableview = ilDclTableView::find($tableview);
 
  324        $assigned_roles = $rbacreview->assignedRoles($user_id ? $user_id : 
$ilUser->getId());
 
  325        $allowed_roles = $tableview->getRoles();
 
  327        return !empty(array_intersect($assigned_roles, $allowed_roles));
 
  343        return $table->getIsVisible() || ($table_id == $table->getCollectionObject()->getFirstVisibleTableId());
 
  354    public static function hasAccessTo($ref_id, $table_id, $tableview_id)
 
  357        $tableview = ilDclTableView::find($tableview_id);
 
  361        if (($tableview->getTableId() != $table_id)
 
  362            || !self::isTableInDataCollection($table, $ref_id)
 
  424        if (!self::isTableInDataCollection($table, $ref_id)) {
 
An exception for terminatinating execution or to throw for unit testing.
const IL_NO_OBJECT_ACCESS
static getTableCache($table_id=0)
Class ilObjDataCollectionAccess.
static hasAddRecordAccess($ref, $user_id=0)
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
static isTableInDataCollection($table, $ref_id)
static checkAccessForDataCollectionId($data_collection_id)
static hasAccessToEditTable($ref_id, $table_id)
static hasAccessToTableView($tableview, $user_id=0)
This only checks access to the tableview - if the full access check is required, use hasAccessTo($ref...
static checkActionForObjId($action, $obj_id)
static _lookupOnline($a_id)
Check wether datacollection is online.
static hasAccessToFields($ref_id, $table_id)
static hasEditAccess($ref, $user_id=0)
Has permission to view and edit all entries event when he is not the owner.
static hasReadAccess($ref, $user_id=0)
static _checkGoto($a_target)
check whether goto script will succeed
static _getCommands()
get commands
static hasPermissionToAddRecord($ref_id, $table_id)
static hasWriteAccess($ref, $user_id=0)
static hasAccessToField($ref_id, $table_id, $field_id)
static hasAccessToTable($table_id)
returns true if either the table is visible for all users, or no tables are visible and this is the t...
static _getAllReferences($a_id)
get all reference ids of object