protected function aclPrincipalPropSetReport($path, Xml\Request\AclPrincipalPropSetReport $report)
    {
        if (0 !== $this->server->getHTTPDepth(0)) {
            throw new BadRequest('The {DAV:}acl-principal-prop-set REPORT only supports Depth 0');
        }

        // Fetching ACL rules for the given path. We're using the property
        // API and not the local getACL, because it will ensure that all
        // business rules and restrictions are applied.
        $acl = $this->server->getProperties($path, '{DAV:}acl');

        if (!$acl || !isset($acl['{DAV:}acl'])) {
            throw new Forbidden('Could not fetch ACL rules for this path');
        }

        $principals = [];
        foreach ($acl['{DAV:}acl']->getPrivileges() as $ace) {
            if ('{' === $ace['principal'][0]) {
                // It's not a principal, it's one of the special rules such as {DAV:}authenticated
                continue;
            }

            $principals[] = $ace['principal'];
        }

        $properties = $this->server->getPropertiesForMultiplePaths(
            $principals,
            $report->properties
        );

        $this->server->httpResponse->setStatus(207);
        $this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
        $this->server->httpResponse->setBody(
            $this->server->generateMultiStatus($properties)
        );
    }
protected function aclPrincipalPropSetReport($path, Xml\Request\AclPrincipalPropSetReport $report)
    {
        if (0 !== $this->server->getHTTPDepth(0)) {
            throw new BadRequest('The {DAV:}acl-principal-prop-set REPORT only supports Depth 0');
        }

        // Fetching ACL rules for the given path. We're using the property
        // API and not the local getACL, because it will ensure that all
        // business rules and restrictions are applied.
        $acl = $this->server->getProperties($path, '{DAV:}acl');

        if (!$acl || !isset($acl['{DAV:}acl'])) {
            throw new Forbidden('Could not fetch ACL rules for this path');
        }

        $principals = [];
        foreach ($acl['{DAV:}acl']->getPrivileges() as $ace) {
            if ('{' === $ace['principal'][0]) {
                // It's not a principal, it's one of the special rules such as {DAV:}authenticated
                continue;
            }

            $principals[] = $ace['principal'];
        }

        $properties = $this->server->getPropertiesForMultiplePaths(
            $principals,
            $report->properties
        );

        $this->server->httpResponse->setStatus(207);
        $this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
        $this->server->httpResponse->setBody(
            $this->server->generateMultiStatus($properties)
        );
    }
protected function aclPrincipalPropSetReport ( $ path , Xml \ Request \ AclPrincipalPropSetReport $ report ) { if ( 0 !== $ this -> server -> getHTTPDepth ( 0 ) ) { throw new BadRequest ( 'The {DAV:}acl-principal-prop-set REPORT only supports Depth 0' ) ; } // Fetching ACL rules for the given path. We're using the property // API and not the local getACL, because it will ensure that all // business rules and restrictions are applied. $ acl = $ this -> server -> getProperties ( $ path , '{DAV:}acl' ) ; if ( ! $ acl || ! isset ( $ acl [ '{DAV:}acl' ] ) ) { throw new Forbidden ( 'Could not fetch ACL rules for this path' ) ; } $ principals = [ ] ; foreach ( $ acl [ '{DAV:}acl' ] -> getPrivileges ( ) as $ ace ) { if ( '{' === $ ace [ 'principal' ] [ 0 ] ) { // It's not a principal, it's one of the special rules such as {DAV:}authenticated continue ; } $ principals [ ] = $ ace [ 'principal' ] ; } $ properties = $ this -> server -> getPropertiesForMultiplePaths ( $ principals , $ report -> properties ) ; $ this -> server -> httpResponse -> setStatus ( 207 ) ; $ this -> server -> httpResponse -> setHeader ( 'Content-Type' , 'application/xml; charset=utf-8' ) ; $ this -> server -> httpResponse -> setBody ( $ this -> server -> generateMultiStatus ( $ properties ) ) ; }
aclPrincipalPropSet REPORT.

This method is responsible for handling the {DAV:}acl-principal-prop-set
REPORT, as defined in:

https://tools.ietf.org/html/rfc3744#section-9.2

This REPORT allows a user to quickly fetch information about all
principals specified in the access control list. Most commonly this
is used to for example generate a UI with ACL rules, allowing you
to show names for principals for every entry.

@param string                                $path
@param Xml\Request\AclPrincipalPropSetReport $report
aclPrincipalPropSet REPORT .