In my new application I want to have for every user it's own structure on the server filesystem. Where do I start? Do I have to create my own backend tree. And from what point on do I have access to the logged in user? My server code looks as follows (simplified):
$authBackend = new \Sabre\DAV\Auth\Backend\My(JFactory::getDbo()); $calendarBackend = new \Sabre\CalDAV\Backend\PDO($pdo, $prefix . 'a_calendars', $prefix . 'a_calendarobjects'); $principalBackend = new \Sabre\DAVACL\PrincipalBackend\PDO($pdo, $prefix . 'a_principals', $prefix . 'a_groupmembers'); $tree = array( new Sabre\DAV\FS\Directory(ROOT . '/media/a/dav/data') // new \Sabre\CalDAV\Principal\Collection($principalBackend), // new \Sabre\CalDAV\CalendarRootNode($principalBackend, // $calendarBackend) ); \Sabre\DAV\Server::$exposeVersion = false; $server = new \Sabre\DAV\Server($tree); $lockBackend = new \Sabre\DAV\Locks\Backend\File(ROOT . '/media/a/dav/locks'); $lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend); $server->addPlugin($lockPlugin); $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend, 'SabreDAV')); $server->addPlugin(new \Sabre\DAVACL\Plugin()); $server->addPlugin(new \Sabre\CalDAV\Plugin()); $server->addPlugin(new \Sabre\DAV\Browser\Plugin()); $server->exec(); As you can see, the tree root path is already set here. Can I set it somehow afterwards, that the root is pointing to the users folder (eg. ROOT . '/media/a/dav/data/jake'). -- You received this message because you are subscribed to the Google Groups "SabreDAV Discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sabredav-discuss/CAAbUApa3gMzr0ddPKHksWfHgGCOsy4zYm_V%3Doat2OHjakmnTLQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
