diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-21 15:06:48 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-26 13:00:00 +0100 |
commit | c79496b5a3ac05f607e4ac0d4036da42e120d28f (patch) | |
tree | c320268a73df4747bf5554fa84a634031fffa59e /apps/dav/lib/rootcollection.php | |
parent | 9a7a45bc37ff07dcb3d57f91ab8014fd21c4a40e (diff) | |
download | nextcloud-server-c79496b5a3ac05f607e4ac0d4036da42e120d28f.tar.gz nextcloud-server-c79496b5a3ac05f607e4ac0d4036da42e120d28f.zip |
Introduced the new webdav endpoint remote.php/dav holding the principals and the files collection
Diffstat (limited to 'apps/dav/lib/rootcollection.php')
-rw-r--r-- | apps/dav/lib/rootcollection.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/dav/lib/rootcollection.php b/apps/dav/lib/rootcollection.php new file mode 100644 index 00000000000..62ec3219caa --- /dev/null +++ b/apps/dav/lib/rootcollection.php @@ -0,0 +1,29 @@ +<?php + +namespace OCA\DAV; + +use OCA\DAV\Connector\Sabre\Principal; +use Sabre\CalDAV\Principal\Collection; +use Sabre\DAV\SimpleCollection; + +class RootCollection extends SimpleCollection { + + public function __construct() { + $principalBackend = new Principal( + \OC::$server->getConfig(), + \OC::$server->getUserManager() + ); + $principalCollection = new Collection($principalBackend); + $principalCollection->disableListing = true; + $filesCollection = new Files\RootCollection($principalBackend); + $filesCollection->disableListing = true; + + $children = [ + $principalCollection, + $filesCollection, + ]; + + parent::__construct('root', $children); + } + +} |