示例#1
0
 /**
  * @expectedException Sabre_DAV_Exception_MethodNotAllowed
  */
 public function testSetACl()
 {
     $principalBackend = new Sabre_DAVACL_MockPrincipalBackend();
     $principal = new Sabre_DAVACL_Principal($principalBackend, array('uri' => 'principals/admin'));
     $principal->setACL(array());
 }
示例#2
0
 /**
  * Returns a list of ACE's for this node.
  *
  * Each ACE has the following properties:
  *   * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
  *     currently the only supported privileges
  *   * 'principal', a url to the principal who owns the node
  *   * 'protected' (optional), indicating that this ACE is not allowed to
  *      be updated.
  *
  * @return array
  */
 public function getACL()
 {
     $acl = parent::getACL();
     $acl[] = array('privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'] . '/calendar-proxy-read', 'protected' => true);
     $acl[] = array('privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'] . '/calendar-proxy-write', 'protected' => true);
     return $acl;
 }
 public function testGetSupportedPrivilegeSet()
 {
     $principalBackend = new Sabre_DAVACL_MockPrincipalBackend();
     $principal = new Sabre_DAVACL_Principal($principalBackend, array('uri' => 'principals/admin'));
     $this->assertNull($principal->getSupportedPrivilegeSet());
 }