/**
  * @param $ref int the reference id of the datacollection object to check.
  *
  * @deprecated
  * @return bool whether or not the current user has add/edit_entry access to the referenced datacollection
  */
 public static function _hasReadAccess($ref)
 {
     return ilObjDataCollectionAccess::hasReadAccess($ref);
 }
 /**
  * @param int $ref_id
  * @param     $record ilDataCollectionRecord
  *
  * @return bool
  */
 public function hasPermissionToViewRecord($ref_id, $record)
 {
     global $ilUser, $rbacreview;
     /** @var ilRbacReview $rbacreview */
     if (ilObjDataCollectionAccess::hasWriteAccess($ref_id)) {
         return true;
     }
     if (ilObjDataCollectionAccess::hasReadAccess($ref_id)) {
         // Check for view only own entries setting
         if ($this->getViewOwnRecordsPerm() && $ilUser->getId() != $record->getOwner()) {
             return false;
         }
         return true;
     }
     return false;
 }