1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Merge pull request #563 from owncloud/app-group-enable-remote

fix caldav when the calendar app is only enabled for specific groups
This commit is contained in:
Lukas Reschke 2014-11-18 10:16:59 +01:00
commit d5a26d7abb

View File

@ -22,7 +22,9 @@
*
*/
OCP\App::checkAppEnabled('contacts');
if (!\OC::$server->getAppManager()->isInstalled('contacts')) {
throw new Exception('App not installed: contacts');
}
if (substr(OCP\Util::getRequestUri(), 0, strlen(OC_App::getAppWebPath('contacts').'/carddav.php'))
=== OC_App::getAppWebPath('contacts').'/carddav.php'
@ -70,6 +72,10 @@ $server->addPlugin(new \Sabre\DAVACL\Plugin());
$server->addPlugin(new \Sabre\DAV\Browser\Plugin(false)); // Show something in the Browser, but no upload
$server->addPlugin(new \Sabre\CardDAV\VCFExportPlugin());
$server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('carddav'));
$server->addPlugin(new \OC\Connector\Sabre\AppEnabledPlugin(
'contacts',
OC::$server->getAppManager()
));
if (defined('DEBUG') && DEBUG) {
$server->debugExceptions = true;