diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-05-28 17:46:24 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-05-28 17:46:24 +0200 |
commit | 66effbfe0827fc61fff6d248797a894213ad20d6 (patch) | |
tree | 0fbb5ca644e1140e5b3b44b1adc874043790c388 /vendor/sabre/dav/lib/DAVACL/FS | |
parent | ac4688eac087854bf8cb0c893d7a79052ad63a20 (diff) | |
download | volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.gz volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.bz2 volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.zip |
upgrade to sabre32
Diffstat (limited to 'vendor/sabre/dav/lib/DAVACL/FS')
-rw-r--r-- | vendor/sabre/dav/lib/DAVACL/FS/Collection.php | 52 | ||||
-rw-r--r-- | vendor/sabre/dav/lib/DAVACL/FS/File.php | 49 | ||||
-rw-r--r-- | vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php | 72 |
3 files changed, 14 insertions, 159 deletions
diff --git a/vendor/sabre/dav/lib/DAVACL/FS/Collection.php b/vendor/sabre/dav/lib/DAVACL/FS/Collection.php index 5fab4768c..1c08b43b1 100644 --- a/vendor/sabre/dav/lib/DAVACL/FS/Collection.php +++ b/vendor/sabre/dav/lib/DAVACL/FS/Collection.php @@ -3,6 +3,7 @@ namespace Sabre\DAVACL\FS; use Sabre\DAV\FSExt\Directory as BaseCollection; +use Sabre\DAVACL\ACLTrait; use Sabre\DAVACL\IACL; use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\Exception\NotFound; @@ -16,6 +17,8 @@ use Sabre\DAV\Exception\NotFound; */ class Collection extends BaseCollection implements IACL { + use ACLTrait; + /** * A list of ACL rules. * @@ -52,8 +55,8 @@ class Collection extends BaseCollection implements IACL { * exist. * * @param string $name - * @throws DAV\Exception\NotFound - * @return DAV\INode + * @throws NotFound + * @return \Sabre\DAV\INode */ function getChild($name) { @@ -88,19 +91,6 @@ class Collection extends BaseCollection implements IACL { } /** - * Returns a group principal - * - * This must be a url to a principal, or null if there's no owner - * - * @return string|null - */ - function getGroup() { - - return null; - - } - - /** * Returns a list of ACE's for this node. * * Each ACE has the following properties: @@ -118,36 +108,4 @@ class Collection extends BaseCollection implements IACL { } - /** - * Updates the ACL - * - * This method will receive a list of new ACE's as an array argument. - * - * @param array $acl - * @return void - */ - function setACL(array $acl) { - - throw new Forbidden('Setting ACL is not allowed here'); - - } - - /** - * Returns the list of supported privileges for this node. - * - * The returned data structure is a list of nested privileges. - * See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple - * standard structure. - * - * If null is returned from this method, the default privilege set is used, - * which is fine for most common usecases. - * - * @return array|null - */ - function getSupportedPrivilegeSet() { - - return null; - - } - } diff --git a/vendor/sabre/dav/lib/DAVACL/FS/File.php b/vendor/sabre/dav/lib/DAVACL/FS/File.php index 0d549528b..387597bf7 100644 --- a/vendor/sabre/dav/lib/DAVACL/FS/File.php +++ b/vendor/sabre/dav/lib/DAVACL/FS/File.php @@ -4,7 +4,7 @@ namespace Sabre\DAVACL\FS; use Sabre\DAV\FSExt\File as BaseFile; use Sabre\DAVACL\IACL; -use Sabre\DAV\Exception\Forbidden; +use Sabre\DAVACL\ACLTrait; /** * This is an ACL-enabled file node. @@ -15,6 +15,8 @@ use Sabre\DAV\Exception\Forbidden; */ class File extends BaseFile implements IACL { + use ACLTrait; + /** * A list of ACL rules. * @@ -58,19 +60,6 @@ class File extends BaseFile implements IACL { } /** - * Returns a group principal - * - * This must be a url to a principal, or null if there's no owner - * - * @return string|null - */ - function getGroup() { - - return null; - - } - - /** * Returns a list of ACE's for this node. * * Each ACE has the following properties: @@ -88,36 +77,4 @@ class File extends BaseFile implements IACL { } - /** - * Updates the ACL - * - * This method will receive a list of new ACE's as an array argument. - * - * @param array $acl - * @return void - */ - function setACL(array $acl) { - - throw new Forbidden('Setting ACL is not allowed here'); - - } - - /** - * Returns the list of supported privileges for this node. - * - * The returned data structure is a list of nested privileges. - * See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple - * standard structure. - * - * If null is returned from this method, the default privilege set is used, - * which is fine for most common usecases. - * - * @return array|null - */ - function getSupportedPrivilegeSet() { - - return null; - - } - } diff --git a/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php b/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php index c27616770..9e21353ea 100644 --- a/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php +++ b/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php @@ -2,8 +2,8 @@ namespace Sabre\DAVACL\FS; -use Sabre\DAV\Exception\Forbidden; use Sabre\DAVACL\AbstractPrincipalCollection; +use Sabre\DAVACL\ACLTrait; use Sabre\DAVACL\IACL; use Sabre\DAVACL\PrincipalBackend\BackendInterface; use Sabre\Uri; @@ -21,6 +21,8 @@ use Sabre\Uri; */ class HomeCollection extends AbstractPrincipalCollection implements IACL { + use ACLTrait; + /** * Name of this collection. * @@ -70,20 +72,15 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL { * supplied by the authentication backend. * * @param array $principalInfo - * @return void + * @return \Sabre\DAVACL\INode */ function getChildForPrincipal(array $principalInfo) { $owner = $principalInfo['uri']; $acl = [ [ - 'privilege' => '{DAV:}read', - 'principal' => $owner, - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => $owner, + 'privilege' => '{DAV:}all', + 'principal' => '{DAV:}owner', 'protected' => true, ], ]; @@ -103,31 +100,6 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL { } - /** - * Returns the owner principal - * - * This must be a url to a principal, or null if there's no owner - * - * @return string|null - */ - function getOwner() { - - return null; - - } - - /** - * Returns a group principal - * - * This must be a url to a principal, or null if there's no owner - * - * @return string|null - */ - function getGroup() { - - return null; - - } /** * Returns a list of ACE's for this node. @@ -153,36 +125,4 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL { } - /** - * Updates the ACL - * - * This method will receive a list of new ACE's as an array argument. - * - * @param array $acl - * @return void - */ - function setACL(array $acl) { - - throw new Forbidden('Setting ACL is not allowed here'); - - } - - /** - * Returns the list of supported privileges for this node. - * - * The returned data structure is a list of nested privileges. - * See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple - * standard structure. - * - * If null is returned from this method, the default privilege set is used, - * which is fine for most common usecases. - * - * @return array|null - */ - function getSupportedPrivilegeSet() { - - return null; - - } - } |