/** * Returns the list of supported privileges for this node. * * The returned data structure is a list of nested privileges. * See Sabre_DAVACL_Plugin::getDefaultSupportedPrivilegeSet for a simple * standard structure. * * If null is returned from this method, the default privilege set is used, * which is fine for most common usecases. * * @return array|null */ public function getSupportedPrivilegeSet() { $default = Sabre_DAVACL_Plugin::getDefaultSupportedPrivilegeSet(); // We need to inject 'read-free-busy' in the tree, aggregated under // {DAV:}read. foreach ($default['aggregates'] as &$agg) { if ($agg['privilege'] !== '{DAV:}read') { continue; } $agg['aggregates'][] = array('privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}read-free-busy'); } return $default; }
/** * Returns the list of supported privileges for this node. * * The returned data structure is a list of nested privileges. * See Sabre_DAVACL_Plugin::getDefaultSupportedPrivilegeSet for a simple * standard structure. * * If null is returned from this method, the default privilege set is used, * which is fine for most common usecases. * * @return array|null */ public function getSupportedPrivilegeSet() { $default = Sabre_DAVACL_Plugin::getDefaultSupportedPrivilegeSet(); $default['aggregates'][] = array('privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy'); return $default; }