|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @copyright Copyright (c) 2017, Christoph Seitz <[email protected]> |
|
5
|
|
|
* |
|
6
|
|
|
* @author Christoph Seitz <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* @license GNU AGPL version 3 or any later version |
|
9
|
|
|
* |
|
10
|
|
|
* This code is free software: you can redistribute it and/or modify |
|
11
|
|
|
* it under the terms of the GNU Affero General Public License, version 3, |
|
12
|
|
|
* as published by the Free Software Foundation. |
|
13
|
|
|
* |
|
14
|
|
|
* This program is distributed in the hope that it will be useful, |
|
15
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17
|
|
|
* GNU Affero General Public License for more details. |
|
18
|
|
|
* |
|
19
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3, |
|
20
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/> |
|
21
|
|
|
* |
|
22
|
|
|
*/ |
|
23
|
|
|
|
|
24
|
|
|
namespace OCA\DAV\CalDAV\Principal; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* Class User |
|
28
|
|
|
* |
|
29
|
|
|
* @package OCA\DAV\CalDAV\Principal |
|
30
|
|
|
*/ |
|
31
|
|
|
class User extends \Sabre\CalDAV\Principal\User { |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* Returns a list of ACE's for this node. |
|
35
|
|
|
* |
|
36
|
|
|
* Each ACE has the following properties: |
|
37
|
|
|
* * 'privilege', a string such as {DAV:}read or {DAV:}write. These are |
|
38
|
|
|
* currently the only supported privileges |
|
39
|
|
|
* * 'principal', a url to the principal who owns the node |
|
40
|
|
|
* * 'protected' (optional), indicating that this ACE is not allowed to |
|
41
|
|
|
* be updated. |
|
42
|
|
|
* |
|
43
|
|
|
* @return array |
|
44
|
|
|
*/ |
|
45
|
|
View Code Duplication |
function getACL() { |
|
|
|
|
|
|
46
|
|
|
$acl = parent::getACL(); |
|
47
|
|
|
$acl[] = [ |
|
48
|
|
|
'privilege' => '{DAV:}read', |
|
49
|
|
|
'principal' => '{DAV:}authenticated', |
|
50
|
|
|
'protected' => true, |
|
51
|
|
|
]; |
|
52
|
|
|
return $acl; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
} |
|
56
|
|
|
|
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.