summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/AppInfo
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-04-16 14:14:31 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-25 20:25:10 +0200
commit09940bcde697df90423cb0b4ecb4e62ba31bfaf7 (patch)
treed535808bcaddaa99b79a9be4978bea7582ad7adc /apps/files_trashbin/lib/AppInfo
parent9c64a203e308f990e54fb59c1c18ed0778f58460 (diff)
downloadnextcloud-server-09940bcde697df90423cb0b4ecb4e62ba31bfaf7.tar.gz
nextcloud-server-09940bcde697df90423cb0b4ecb4e62ba31bfaf7.zip
List trashbin in DAV
First steps for #1332 * Add a new DAV collection * List all files in the trashbin for this user * Deleting files from trashbin * Get files from trashbin (just read) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_trashbin/lib/AppInfo')
-rw-r--r--apps/files_trashbin/lib/AppInfo/Application.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/AppInfo/Application.php b/apps/files_trashbin/lib/AppInfo/Application.php
index e9d4e6ecc1d..ea27c8c16ea 100644
--- a/apps/files_trashbin/lib/AppInfo/Application.php
+++ b/apps/files_trashbin/lib/AppInfo/Application.php
@@ -23,6 +23,7 @@
namespace OCA\Files_Trashbin\AppInfo;
+use OCA\DAV\Connector\Sabre\Principal;
use OCP\AppFramework\App;
use OCA\Files_Trashbin\Expiration;
use OCP\AppFramework\Utility\ITimeFactory;
@@ -47,5 +48,17 @@ class Application extends App {
$c->query(ITimeFactory::class)
);
});
+
+ /*
+ * Register $principalBackend for the DAV collection
+ */
+ $container->registerService('principalBackend', function () {
+ return new Principal(
+ \OC::$server->getUserManager(),
+ \OC::$server->getGroupManager(),
+ \OC::$server->getShareManager(),
+ \OC::$server->getUserSession()
+ );
+ });
}
}