Skip to content

Commit

Permalink
fix(Context): fix wrong parameters to permission check
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Sep 4, 2024
1 parent 215ca74 commit 4b518c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/ShareService.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public function updateDisplayMode(int $shareId, int $displayMode, string $userId
} else {
// setting user display mode override only requires access
// this does not seem to work
if (!$this->permissionsService->canAccessContextById($item->getId())) {
if (!$this->permissionsService->canAccessContextById($item->getNodeId(), $userId)) {
throw new PermissionError(sprintf('PermissionError: can not update share with id %d', $shareId));
}
}
Expand Down

0 comments on commit 4b518c0

Please sign in to comment.