Changeset 6010
- Timestamp:
- 04/24/12 10:53:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/interceptors/DAViCalAdapter.php
r5907 r6010 78 78 $cal = new CalDAVClient( Config::service( 'CalDAV' , 'url' ).'/'.$calendar['location'].'/', Config::me( 'uid' ), Config::me( 'password' )); 79 79 $cal->DoXMLRequest('ACL', $xml); 80 self::setReadCurrentUserPrivilege(Config::service( 'CalDAV' , 'url' ).'/'.substr($calendar['location'] , 0 , (strpos ( $calendar['location'] , '/' ) + 1 ) )); 80 81 ob_end_clean(); 81 82 } … … 112 113 require_once ROOTPATH.'/plugins/davicalCliente/caldav-client-v2.php'; 113 114 $cal = new CalDAVClient( Config::service( 'CalDAV' , 'url' ).'/'.$calendar['location'].'/', Config::me( 'uid' ), Config::me( 'password' )); 114 $cal->DoXMLRequest('ACL', $xml); 115 $cal->DoXMLRequest('ACL', $xml); 116 self::setReadCurrentUserPrivilege(Config::service( 'CalDAV' , 'url' ).'/'.substr($calendar['location'] , 0 ,(strpos ( $calendar['location'] , '/' ) + 1 ) )); 115 117 ob_end_clean(); 116 118 117 119 } 120 } 121 122 123 private static function setReadCurrentUserPrivilege( $principalURL ) 124 { 125 //Compatibilidade com o Thundebird e outros Clientes externos. 126 //Esses clientes nescessitam ter acesso para ler suas permissões no nivel de prinvcipal 127 128 $xml ="<?xml version=\"1.0\" encoding=\"utf-8\" ?> 129 <D:acl xmlns:D=\"DAV:\"> 130 <D:ace> 131 <D:principal> 132 <D:authenticated /> 133 </D:principal> 134 <D:grant> 135 <D:privilege><D:read-current-user-privilege-set/></D:privilege> 136 </D:grant> 137 </D:ace> 138 </D:acl>"; 139 ob_start(); 140 require_once ROOTPATH.'/plugins/davicalCliente/caldav-client-v2.php'; 141 $cal = new CalDAVClient( $principalURL , Config::me( 'uid' ) , Config::me( 'password' ) ); 142 $cal->DoXMLRequest('ACL', $xml); 143 ob_end_clean(); 118 144 } 119 145
Note: See TracChangeset
for help on using the changeset viewer.