Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to delete an item via webdav without trash bin #49605

Open
Rello opened this issue Dec 2, 2024 · 1 comment
Open

Add option to delete an item via webdav without trash bin #49605

Rello opened this issue Dec 2, 2024 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: dav feature: trashbin

Comments

@Rello
Copy link
Contributor

Rello commented Dec 2, 2024

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
There are occasions, where a file needs to be deleted by the client "fully" without going to the trash bin. Reason to be discussed internally

Describe the solution you'd like
Support this in server with e.g. a header flag

private function doDelete(string $path, string $method): bool {
if (
!\OC::$server->getAppManager()->isEnabledForUser('files_trashbin')
|| (pathinfo($path, PATHINFO_EXTENSION) === 'part')
|| $this->shouldMoveToTrash($path) === false
) {
return call_user_func([$this->storage, $method], $path);
}
// check permissions before we continue, this is especially important for
// shared files
if (!$this->isDeletable($path)) {
return false;
}
$isMovedToTrash = $this->trashManager->moveToTrash($this, $path);
if (!$isMovedToTrash) {
return call_user_func([$this->storage, $method], $path);
} else {
return true;
}
}

Describe alternatives you've considered
Delete the file; Query the trash bin; Delete the file also from trash bin;
this is not regarded save as we do not have control over dependent webdav calls

Additional context
n/a

@Rello Rello added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Dec 2, 2024
@Rello Rello changed the title Add option to delete an item without trash bin Add option to delete an item via webdav without trash bin Dec 2, 2024
@joshtrichards
Copy link
Member

Implementation might be intersect with (or be a solution for):

#14436

Versioning might be relevant too:

#17566
#11086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: dav feature: trashbin
Projects
None yet
Development

No branches or pull requests

2 participants