Skip to content

Commit

Permalink
fix wrong method call to check restore permissions
Browse files Browse the repository at this point in the history
fixes nextcloud#1349

Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and jngrb committed Apr 15, 2021
1 parent bc651af commit fc73b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Trash/TrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function restoreItem(ITrashItem $item) {
if ($node === null) {
throw new NotFoundException();
}
if (!$this->userHasACLAccessToPath($item->getUser(), $folderId . '/' . $item->getOriginalLocation(), Constants::PERMISSION_UPDATE)) {
if (!$this->userHasAccessToPath($item->getUser(), $folderId . '/' . $item->getOriginalLocation(), Constants::PERMISSION_UPDATE)) {
throw new NotPermittedException();
}
$folderPermissions = $this->folderManager->getFolderPermissionsForUser($item->getUser(), (int)$folderId);
Expand Down

0 comments on commit fc73b67

Please sign in to comment.