Hi,

I discovered SABREDAV two weeks ago, just after V3.2.0 was released

I spent the last few days reading sabredav documentation, studying the 
code, and trying to implement it in a software that I'm developping since 
10 years for a client.

At this point, I achieved to create all the necessary backends to my MYSQL 
database : auth, principal, caldav, carddav, homecollection

I'm now trying to implement some "sharing" features.
CALDAV sharing works out of the box
I understand that CARDAV sharing isn't implemented yet, so I'll delay this 
feature and wait for 3.3.

But i'm a bit confused about WEBDAV sharing.
Is it possible to share just one folder or one file ?
I tried to edit the IsharedNode.php file this file doesn't seem to be 
loaded.
Am I loading the wrong plugins ?
Is there a way to share just one folder in V3.2.0 ?
What file should I edit to make this work ?

Here's my current server.php code (PDO_OPTIMUS are my custom backends) :

Thanks for you help


$principalBackend = new Sabre\DAVACL\PrincipalBackend\PDO_OPTIMUS($pdo);
$caldavBackend = new Sabre\CalDAV\Backend\PDO_OPTIMUS($pdo);
$carddavBackend   = new Sabre\CardDAV\Backend\PDO_OPTIMUS($pdo);
$lockBackend = new Sabre\DAV\Locks\Backend\PDO_OPTIMUS($pdo);
$storageBackend = new Sabre\DAV\PropertyStorage\Backend\PDO_OPTIMUS($pdo);
$authBackend = new Sabre\DAV\Auth\Backend\PDO_OPTIMUS($pdo);
$authBackend->setRealm('OPTIMUS');


$nodes = [
 new Sabre\DAVACL\PrincipalCollection($principalBackend),
 new Sabre\DAVACL\FS\HomeCollection_OPTIMUS($principalBackend, '/srv/files'
),
 new Sabre\CalDAV\CalendarRoot($principalBackend, $caldavBackend),
 new Sabre\CardDAV\AddressBookRoot($principalBackend, $carddavBackend),
];


$server = new Sabre\DAV\Server($nodes);


$server->addPlugin(new Sabre\DAV\Auth\Plugin($authBackend));
$server->addPlugin(new Sabre\DAV\Locks\Plugin($lockBackend));
$server->addPlugin(new Sabre\DAV\PropertyStorage\Plugin($storageBackend));
$server->addPlugin(new Sabre\DAV\Browser\Plugin());
$server->addPlugin(new Sabre\DAV\Sharing\Plugin());
$server->addPlugin(new Sabre\DAV\Sync\Plugin());
$server->addPlugin(new Sabre\CalDAV\Plugin());
$server->addPlugin(new Sabre\CalDAV\Schedule\Plugin());
$server->addPlugin(new Sabre\CalDAV\SharingPlugin());
$server->addPlugin(new Sabre\CalDAV\ICSExportPlugin());
$server->addPlugin(new Sabre\CardDAV\Plugin());
$server->addPlugin(new Sabre\CardDAV\VCFExportPlugin());


$aclPlugin = new Sabre\DAVACL\Plugin();

$aclPlugin->allowAccessToNodesWithoutACL = false;
$aclPlugin->hideNodesFromListings = true;
$aclPlugin->adminPrincipals[] = 'principals/[email protected]';
$server->addPlugin($aclPlugin);


$server->exec();


-- 
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/d9b13bd4-6ed4-44cf-b493-a4c0842bc69c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to