Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release_8' into release_8
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Sep 19, 2024
2 parents d3e02a7 + d10900d commit 1a858bc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function initItem(
$target_title = ilContainerReference::_lookupTitle($obj_id);
$target_description = ilObject::_lookupDescription($target_obj_id);

$this->deleted = $tree->isDeleted($target_ref_id);
$this->deleted = !$target_ref_id || $tree->isDeleted($target_ref_id);

parent::initItem($target_ref_id, $target_obj_id, $type, $target_title, $target_description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function initItem(
$target_title = ilContainerReference::_lookupTitle($obj_id);
$target_description = ilObject::_lookupDescription($target_obj_id);

$this->deleted = $tree->isDeleted($target_ref_id);
$this->deleted = !$target_ref_id || $tree->isDeleted($target_ref_id);

$ilBench->start("ilObjCourseListGUI", "1000_checkAllConditions");
$this->conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($target_ref_id, $target_obj_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function initItem(
$target_title = ilContainerReference::_lookupTitle($obj_id);
$target_description = ilObject::_lookupDescription($target_obj_id);

$this->deleted = $tree->isDeleted($target_ref_id);
$this->deleted = !$target_ref_id || $tree->isDeleted($target_ref_id);

$this->conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($target_ref_id, $target_obj_id);

Expand Down
15 changes: 13 additions & 2 deletions Services/MediaObjects/classes/class.ilObjMediaObjectAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ilObjMediaObjectAccess implements ilWACCheckingClass
protected ilObjectDataCache $obj_data_cache;
protected ilObjUser $user;
protected ilAccessHandler $access;
protected ilLogger $logger;

public function __construct()
{
Expand All @@ -33,6 +34,7 @@ public function __construct()
$this->obj_data_cache = $DIC["ilObjDataCache"];
$this->user = $DIC->user();
$this->access = $DIC->access();
$this->logger = $DIC->logger()->mob();
}

public function canBeDelivered(ilWACPath $ilWACPath): bool
Expand Down Expand Up @@ -69,11 +71,20 @@ protected function checkAccessMob(
return true;
}
break;

default:
if ($this->checkAccessMobUsage($usage, $oid)) {
if ($oid !== null && $this->checkAccessMobUsage($usage, $oid)) {
return true;
}

if ($oid === null) {
$this->logger->error(
sprintf(
"Could not determine parent obj_id for usage: %s",
json_encode($usage, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT)
)
);
}
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Services/Search/classes/class.ilSearchAutoComplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function getList(string $a_str): string
$rec["keyword"] = '"' . $rec["keyword"] . '"';
}
if (!in_array($rec["keyword"], $list) && !in_array($rec["rbac_id"], $checked)) {
if (ilSearchAutoComplete::checkObjectPermission($rec["rbac_id"])) {
if (ilSearchAutoComplete::checkObjectPermission((int) $rec["rbac_id"])) {
$list[] = $lim . $rec["keyword"];
$cnt++;
}
Expand Down

0 comments on commit 1a858bc

Please sign in to comment.