Example #1
0
 /**
  * Returns the list of supported privileges for this node.
  *
  * The returned data structure is a list of nested privileges.
  * See \SabreForRainLoop\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 = 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' => '{' . 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 SabreForRainLoop\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 = DAVACL\Plugin::getDefaultSupportedPrivilegeSet();
     $default['aggregates'][] = array('privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-query-freebusy');
     $default['aggregates'][] = array('privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-post-vevent');
     return $default;
 }