DAVACL   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getACL() 0 6 1
1
<?php
2
/*
3
 * SPDX-License-Identifier: AGPL-3.0-only
4
 * SPDX-FileCopyrightText: Copyright 2016 - 2018 Kopano b.v.
5
 * SPDX-FileCopyrightText: Copyright 2020 - 2024 grommunio GmbH
6
 *
7
 * grommunio DAV ACL class.
8
 */
9
10
namespace grommunio\DAV;
11
12
use Sabre\DAV\INode;
13
use Sabre\DAVACL\Plugin;
14
15
class DAVACL extends Plugin {
16
	/**
17
	 * Returns the full ACL list.
18
	 *
19
	 * Either a uri or a DAV\INode may be passed.
20
	 *
21
	 * null will be returned if the node doesn't support ACLs.
22
	 *
23
	 * @param INode|string $node
24
	 *
25
	 * @return array
26
	 */
27
	public function getACL($node) {
28
		return [
29
			[
30
				'privilege' => '{DAV:}all',
31
				'principal' => '{DAV:}authenticated',
32
				'protected' => true,
33
			],
34
		];
35
	}
36
}
37