Exemplo n.º 1
0
 public function testGetSupportedPrivilegeSet()
 {
     $principalBackend = new PrincipalBackend\Mock();
     $principal = new Principal($principalBackend, array('uri' => 'principals/admin'));
     $this->assertNull($principal->getSupportedPrivilegeSet());
 }
Exemplo n.º 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
  */
 function getACL()
 {
     $acl = parent::getACL();
     $acl[] = ['privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'] . '/calendar-proxy-read', 'protected' => true];
     $acl[] = ['privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'] . '/calendar-proxy-write', 'protected' => true];
     return $acl;
 }