Skip to content
Closed
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
fix(trash): Fix deleting items from public share with write access
When no user in session, use an empty string as deleted_by, which shows
 as "Unknown" in the UI.

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and provokateurin committed Feb 18, 2025
commit c20d1debd15563685c70270a80ffe6f4a01d361e
5 changes: 1 addition & 4 deletions lib/Trash/TrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,7 @@ public function moveToTrash(IStorage $storage, string $internalPath): bool {
$name = basename($internalPath);
$fileEntry = $storage->getCache()->get($internalPath);
$folderId = $storage->getFolderId();
$user = $this->userSession->getUser();
if (!$user) {
throw new \Exception("file moved to trash with no user in context");
}

// ensure the folder exists
$this->getTrashFolder($folderId);

Expand Down
Loading