From f7ca6149d63d09f8ea0828770a243cf61295e2b9 Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Mon, 16 Apr 2018 14:44:49 +0200
Subject: [PATCH] Emptry trashbin

A delete on a users trashbin will empty it (the trashbin won't be
deleted of course)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
---
 apps/files_trashbin/lib/Sabre/TrashHome.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/files_trashbin/lib/Sabre/TrashHome.php b/apps/files_trashbin/lib/Sabre/TrashHome.php
index 45a95ccea80..9c460dbba20 100644
--- a/apps/files_trashbin/lib/Sabre/TrashHome.php
+++ b/apps/files_trashbin/lib/Sabre/TrashHome.php
@@ -44,7 +44,7 @@ class TrashHome implements ICollection {
 	}
 
 	public function delete() {
-		throw new Forbidden('Permission denied to delete your trashbin');
+		\OCA\Files_Trashbin\Trashbin::deleteAll();
 	}
 
 	public function getName(): string {
-- 
GitLab