Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/workflowengine/lib/Entity/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName,
}
}

public function isLegitimatedForUserId(string $uid): bool {
public function isLegitimatedForUserId(string $userId): bool {
try {
$node = $this->getNode();
if ($node->getOwner()->getUID() === $uid) {
if ($node->getOwner()?->getUID() === $userId) {

Check notice

Code scanning / Psalm

DocblockTypeContradiction

OCP\IUser does not contain null

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType

Docblock-defined type OCP\IUser for $__tmp_nullsafe__4692 is never null
return true;
}

Expand All @@ -154,7 +154,7 @@ public function isLegitimatedForUserId(string $uid): bool {
$fileId = $node->getId();
}

$mountInfos = $this->userMountCache->getMountsForFileId($fileId, $uid);
$mountInfos = $this->userMountCache->getMountsForFileId($fileId, $userId);
foreach ($mountInfos as $mountInfo) {
$mount = $this->mountManager->getMountFromMountInfo($mountInfo);
if ($mount && $mount->getStorage() && !empty($mount->getStorage()->getCache()->get($fileId))) {
Expand Down