14 if (is_null($props)) {
17 '{http://calendarserver.org/ns/}shared-url' =>
'calendars/owner/original',
18 '{http://sabredav.org/ns}owner-principal' =>
'principals/owner',
19 '{http://sabredav.org/ns}read-only' =>
false,
20 'share-access' => Sharing\Plugin::ACCESS_READWRITE,
21 'principaluri' =>
'principals/sharee',
32 $sharee->href =
'mailto:removeme@example.org';
33 $sharee->properties[
'{DAV:}displayname'] =
'To be removed';
34 $sharee->access = Sharing\Plugin::ACCESS_READ;
35 $this->backend->updateInvites(1, [$sharee]);
44 $sharee->href =
'mailto:removeme@example.org';
45 $sharee->properties[
'{DAV:}displayname'] =
'To be removed';
46 $sharee->access = Sharing\Plugin::ACCESS_READ;
47 $sharee->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE;
57 $this->assertEquals(
'principals/sharee', $this->
getInstance()->getOwner());
64 'privilege' =>
'{DAV:}write',
65 'principal' =>
'principals/sharee',
69 'privilege' =>
'{DAV:}write',
70 'principal' =>
'principals/sharee/calendar-proxy-write',
74 'privilege' =>
'{DAV:}write-properties',
75 'principal' =>
'principals/sharee',
79 'privilege' =>
'{DAV:}write-properties',
80 'principal' =>
'principals/sharee/calendar-proxy-write',
84 'privilege' =>
'{DAV:}read',
85 'principal' =>
'principals/sharee',
89 'privilege' =>
'{DAV:}read',
90 'principal' =>
'principals/sharee/calendar-proxy-read',
94 'privilege' =>
'{DAV:}read',
95 'principal' =>
'principals/sharee/calendar-proxy-write',
100 'principal' =>
'{DAV:}authenticated',
105 $this->assertEquals($expected, $this->
getInstance()->getACL());
113 'privilege' =>
'{DAV:}write',
114 'principal' =>
'principals/sharee',
118 'privilege' =>
'{DAV:}write',
119 'principal' =>
'principals/sharee/calendar-proxy-write',
123 'privilege' =>
'{DAV:}read',
124 'principal' =>
'principals/sharee',
128 'privilege' =>
'{DAV:}read',
129 'principal' =>
'principals/sharee/calendar-proxy-write',
133 'privilege' =>
'{DAV:}read',
134 'principal' =>
'principals/sharee/calendar-proxy-read',
140 $this->assertEquals($expected, $this->
getInstance()->getChildACL());
151 $newSharees[0]->href =
'mailto:test@example.org';
152 $newSharees[0]->properties[
'{DAV:}displayname'] =
'Foo Bar';
153 $newSharees[0]->comment =
'Booh';
154 $newSharees[0]->access = Sharing\Plugin::ACCESS_READWRITE;
156 $newSharees[1]->href =
'mailto:removeme@example.org';
157 $newSharees[1]->access = Sharing\Plugin::ACCESS_NOACCESS;
159 $instance->updateInvites($newSharees);
164 $expected[0]->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE;
165 $this->assertEquals($expected, $instance->getInvites());
172 $this->assertNull($instance->setPublishStatus(
true));
173 $this->assertNull($instance->setPublishStatus(
false));
This class represents the {DAV:}sharee element.
This object represents a CalDAV calendar that is shared by a different user.
getInstance(array $props=null)
const NS_CALDAV
This is the official CalDAV namespace.