1<?php
2
3namespace Sabre\DAVACL;
4
5use Sabre\DAV;
6
7/**
8 * ACL-enabled node
9 *
10 * If you want to add WebDAV ACL to a node, you must implement this class
11 *
12 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
13 * @author Evert Pot (http://evertpot.com/)
14 * @license http://sabre.io/license/ Modified BSD License
15 */
16interface IACL extends DAV\INode {
17
18    /**
19     * Returns the owner principal
20     *
21     * This must be a url to a principal, or null if there's no owner
22     *
23     * @return string|null
24     */
25    function getOwner();
26
27    /**
28     * Returns a group principal
29     *
30     * This must be a url to a principal, or null if there's no owner
31     *
32     * @return string|null
33     */
34    function getGroup();
35
36    /**
37     * Returns a list of ACE's for this node.
38     *
39     * Each ACE has the following properties:
40     *   * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
41     *     currently the only supported privileges
42     *   * 'principal', a url to the principal who owns the node
43     *   * 'protected' (optional), indicating that this ACE is not allowed to
44     *      be updated.
45     *
46     * @return array
47     */
48    function getACL();
49
50    /**
51     * Updates the ACL
52     *
53     * This method will receive a list of new ACE's as an array argument.
54     *
55     * @param array $acl
56     * @return void
57     */
58    function setACL(array $acl);
59
60    /**
61     * Returns the list of supported privileges for this node.
62     *
63     * The returned data structure is a list of nested privileges.
64     * See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple
65     * standard structure.
66     *
67     * If null is returned from this method, the default privilege set is used,
68     * which is fine for most common usecases.
69     *
70     * @return array|null
71     */
72    function getSupportedPrivilegeSet();
73
74}
75