apps/dav/lib/DAV/Sharing/Backend.php
/**
	 * For shared resources the sharee is set in the ACL of the resource
	 *
	 * @param int $resourceId
	 * @param array $acl
	 * @return array
	 */
For shared resources the sharee is set in the ACL of the resource
@param int $resourceId
@param array $acl
@return array
For shared resources the sharee is set in the ACL of the resource @param int $resourceId @param array $acl @return array
public function applyShareAcl($resourceId, $acl) {
		$shares = $this->getShares($resourceId);
		foreach ($shares as $share) {
			$acl[] = [
				'privilege' => '{DAV:}read',
				'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
				'protected' => true,
			];
			if (!$share['readOnly']) {
				$acl[] = [
					'privilege' => '{DAV:}write',
					'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
					'protected' => true,
				];
			} else if ($this->resourceType === 'calendar') {
				$acl[] = [
					'privilege' => '{DAV:}write-properties',
					'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
					'protected' => true,
				];
			}
		}
		return $acl;
	}
public function applyShareAcl ( $ resourceId , $ acl ) { $ shares = $ this -> getShares ( $ resourceId ) ; foreach ( $ shares as $ share ) { $ acl [ ] = [ 'privilege' => '{DAV:}read' , 'principal' => $ share [ '{' . \ OCA \ DAV \ DAV \ Sharing \ Plugin :: NS_OWNCLOUD . '}principal' ] , 'protected' => true , ] ; if ( ! $ share [ 'readOnly' ] ) { $ acl [ ] = [ 'privilege' => '{DAV:}write' , 'principal' => $ share [ '{' . \ OCA \ DAV \ DAV \ Sharing \ Plugin :: NS_OWNCLOUD . '}principal' ] , 'protected' => true , ] ; } else if ( $ this -> resourceType === 'calendar' ) { $ acl [ ] = [ 'privilege' => '{DAV:}write-properties' , 'principal' => $ share [ '{' . \ OCA \ DAV \ DAV \ Sharing \ Plugin :: NS_OWNCLOUD . '}principal' ] , 'protected' => true , ] ; } } return $ acl ; }
For shared resources the sharee is set in the ACL of the resource
 @param int $resourceId
 @param array $acl
 @return array
For shared resources the sharee is set in the ACL of the resource @param int $resourceId @param array $acl @return array
// Allow changing the properties of read only calendars, // so users can change the visibility.