File tree Expand file tree Collapse file tree
apps/dav/lib/CalDAV/Trashbin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,17 @@ public function getACL(): array {
105105 ],
106106 [
107107 'privilege ' => '{DAV:}unbind ' , // For moving and deletion
108- 'principal ' => '{DAV:}owner ' ,
108+ 'principal ' => $ this ->getOwner (),
109+ 'protected ' => true ,
110+ ],
111+ [
112+ 'privilege ' => '{DAV:}all ' ,
113+ 'principal ' => $ this ->getOwner () . '/calendar-proxy-write ' ,
114+ 'protected ' => true ,
115+ ],
116+ [
117+ 'privilege ' => '{DAV:}read ' ,
118+ 'principal ' => $ this ->getOwner () . '/calendar-proxy-read ' ,
109119 'protected ' => true ,
110120 ],
111121 ];
Original file line number Diff line number Diff line change @@ -137,9 +137,24 @@ public function getACL(): array {
137137 ],
138138 [
139139 'privilege ' => '{DAV:}unbind ' ,
140- 'principal ' => '{DAV:}owner ' ,
140+ 'principal ' => $ this ->getOwner (),
141+ 'protected ' => true ,
142+ ],
143+ [
144+ 'privilege ' => '{DAV:}read ' ,
145+ 'principal ' => $ this ->getOwner () . '/calendar-proxy-write ' ,
146+ 'protected ' => true ,
147+ ],
148+ [
149+ 'privilege ' => '{DAV:}unbind ' ,
150+ 'principal ' => $ this ->getOwner () . '/calendar-proxy-write ' ,
141151 'protected ' => true ,
142- ]
152+ ],
153+ [
154+ 'privilege ' => '{DAV:}read ' ,
155+ 'principal ' => $ this ->getOwner () . '/calendar-proxy-read ' ,
156+ 'protected ' => true ,
157+ ],
143158 ];
144159 }
145160}
Original file line number Diff line number Diff line change @@ -37,6 +37,28 @@ public function getOwner(): string {
3737 return $ this ->principalInfo ['uri ' ];
3838 }
3939
40+ #[\Override]
41+ public function getACL (): array {
42+ $ ownerPrincipal = $ this ->principalInfo ['uri ' ];
43+ return [
44+ [
45+ 'privilege ' => '{DAV:}all ' ,
46+ 'principal ' => $ ownerPrincipal ,
47+ 'protected ' => true ,
48+ ],
49+ [
50+ 'privilege ' => '{DAV:}all ' ,
51+ 'principal ' => $ ownerPrincipal . '/calendar-proxy-write ' ,
52+ 'protected ' => true ,
53+ ],
54+ [
55+ 'privilege ' => '{DAV:}read ' ,
56+ 'principal ' => $ ownerPrincipal . '/calendar-proxy-read ' ,
57+ 'protected ' => true ,
58+ ],
59+ ];
60+ }
61+
4062 #[\Override]
4163 public function createFile ($ name , $ data = null ) {
4264 throw new Forbidden ('Permission denied to create files in the trashbin ' );
You can’t perform that action at this time.
0 commit comments