Lines Matching refs:DAV

5 use Sabre\DAV;
6 use Sabre\DAV\Exception\BadRequest;
7 use Sabre\DAV\Exception\Forbidden;
8 use Sabre\DAV\Exception\NotAuthenticated;
9 use Sabre\DAV\Exception\NotFound;
10 use Sabre\DAV\INode;
11 use Sabre\DAV\Xml\Property\Href;
23 * In addition it also provides support for the {DAV:}current-user-principal
24 * property, defined in RFC5397 and the {DAV:}expand-property report, as
31 class Plugin extends DAV\ServerPlugin {
57 * @var DAV\Server
84 * the {DAV:}principal-property-search report.
91 '{DAV:}displayname' => 'Display name',
97 * of ACL's. They will effectively receive {DAV:}all privileges, as a
145 * using Sabre\DAV\Server::getPlugin
158 * This will be used in the {DAV:}supported-report-set property.
168 '{DAV:}expand-property',
169 '{DAV:}principal-match',
170 '{DAV:}principal-property-search',
171 '{DAV:}principal-search-property-set',
239 /** @var $authPlugin \Sabre\DAV\Auth\Plugin */
306 'principal' => '{DAV:}authenticated',
308 'privilege' => '{DAV:}all',
409 * 'privilege' => '{DAV:}read',
426 * 'privilege' => '{DAV:}read',
430 * 'privilege' => '{DAV:}read-acl',
456 '{DAV:}read' => [
459 '{DAV:}read-acl' => [
463 '{DAV:}read-current-user-privilege-set' => [
469 '{DAV:}write' => [
472 '{DAV:}write-properties' => [
476 '{DAV:}write-content' => [
480 '{DAV:}unlock' => [
487 if ($node instanceof DAV\ICollection) {
488 $supportedPrivileges['{DAV:}write']['aggregates']['{DAV:}bind'] = [
492 $supportedPrivileges['{DAV:}write']['aggregates']['{DAV:}unbind'] = [
498 $supportedPrivileges['{DAV:}write']['aggregates']['{DAV:}write-acl'] = [
571 $fpsTraverse('{DAV:}all', $privs, null, $flat);
584 * @param string|DAV\INode $node
599 'privilege' => '{DAV:}all',
611 * Either a uri or a DAV\INode may be passed.
615 * @param string|DAV\INode $node
636 case '{DAV:}owner' :
645 case '{DAV:}all' :
649 case '{DAV:}authenticated' :
656 case '{DAV:}unauthenticated' :
756 * Sabre\DAV\Server::getPropertiesForPath. Returned
801 * @param DAV\Server $server
804 function initialize(DAV\Server $server) {
834 '{DAV:}alternate-URI-set',
835 '{DAV:}principal-URL',
836 '{DAV:}group-membership',
837 '{DAV:}principal-collection-set',
838 '{DAV:}current-user-principal',
839 '{DAV:}supported-privilege-set',
840 '{DAV:}current-user-privilege-set',
841 '{DAV:}acl',
842 '{DAV:}acl-restrictions',
843 '{DAV:}inherited-acl-set',
844 '{DAV:}owner',
845 '{DAV:}group'
849 // {DAV:}principal resourcetype.
850 $server->resourceTypeMapping['Sabre\\DAVACL\\IPrincipal'] = '{DAV:}principal';
854 $server->xml->elementMap['{DAV:}group-member-set'] = 'Sabre\\DAV\\Xml\\Property\\Href';
855 $server->xml->elementMap['{DAV:}acl'] = 'Sabre\\DAVACL\\Xml\\Property\\Acl';
856 $server->xml->elementMap['{DAV:}acl-principal-prop-set'] = 'Sabre\\DAVACL\\Xml\\Request\\AclPrincipalPropSetReport';
857 $server->xml->elementMap['{DAV:}expand-property'] = 'Sabre\\DAVACL\\Xml\\Request\\ExpandPropertyReport';
858 $server->xml->elementMap['{DAV:}principal-property-search'] = 'Sabre\\DAVACL\\Xml\\Request\\PrincipalPropertySearchReport';
859 $server->xml->elementMap['{DAV:}principal-search-property-set'] = 'Sabre\\DAVACL\\Xml\\Request\\PrincipalSearchPropertySetReport';
860 $server->xml->elementMap['{DAV:}principal-match'] = 'Sabre\\DAVACL\\Xml\\Request\\PrincipalMatchReport';
889 $this->checkPrivileges($path, '{DAV:}read');
898 $this->checkPrivileges($path, '{DAV:}write-content');
906 $this->checkPrivileges($path, '{DAV:}write-properties');
910 $this->checkPrivileges($path, '{DAV:}write-acl');
926 $this->checkPrivileges($path, '{DAV:}read', self::R_RECURSIVE);
945 $this->checkPrivileges($parentUri, '{DAV:}bind');
961 $this->checkPrivileges($parentUri, '{DAV:}unbind', self::R_RECURSIVEPARENTS);
969 * @param DAV\Locks\LockInfo $lock
973 function beforeUnlock($uri, DAV\Locks\LockInfo $lock) {
981 * @param DAV\PropFind $propFind
982 * @param DAV\INode $node
986 function propFind(DAV\PropFind $propFind, DAV\INode $node) {
991 if (!$this->checkPrivileges($path, '{DAV:}read', self::R_PARENT, false)) {
1013 $propFind->handle('{DAV:}alternate-URI-set', function() use ($node) {
1016 $propFind->handle('{DAV:}principal-URL', function() use ($node) {
1019 $propFind->handle('{DAV:}group-member-set', function() use ($node) {
1026 $propFind->handle('{DAV:}group-membership', function() use ($node) {
1033 $propFind->handle('{DAV:}displayname', [$node, 'getDisplayName']);
1037 $propFind->handle('{DAV:}principal-collection-set', function() {
1045 $propFind->handle('{DAV:}current-user-principal', function() {
1052 $propFind->handle('{DAV:}supported-privilege-set', function() use ($node) {
1055 $propFind->handle('{DAV:}current-user-privilege-set', function() use ($node, $propFind, $path) {
1056 if (!$this->checkPrivileges($path, '{DAV:}read-current-user-privilege-set', self::R_PARENT, false)) {
1057 $propFind->set('{DAV:}current-user-privilege-set', null, 403);
1063 $propFind->handle('{DAV:}acl', function() use ($node, $propFind, $path) {
1065 if (!$this->checkPrivileges($path, '{DAV:}read-acl', self::R_PARENT, false)) {
1066 $propFind->set('{DAV:}acl', null, 403);
1072 $propFind->handle('{DAV:}acl-restrictions', function() {
1078 $propFind->handle('{DAV:}owner', function() use ($node) {
1090 * @param DAV\PropPatch $propPatch
1093 function propPatch($path, DAV\PropPatch $propPatch) {
1095 $propPatch->handle('{DAV:}group-member-set', function($value) use ($path) {
1104 throw new DAV\Exception('The group-member-set property MUST be an instance of Sabre\DAV\Property\HrefList or null');
1134 case '{DAV:}principal-property-search' :
1138 case '{DAV:}principal-search-property-set' :
1142 case '{DAV:}expand-property' :
1146 case '{DAV:}principal-match' :
1150 case '{DAV:}acl-principal-prop-set' :
1172 throw new DAV\Exception\BadRequest('XML body expected in ACL request');
1175 $acl = $this->server->xml->expect('{DAV:}acl', $body);
1185 throw new DAV\Exception\MethodNotAllowed('This node does not support the ACL method');
1209 throw new Exception\AceConflict('This resource contained a protected {DAV:}ace, but this privilege did not occur in the ACL request');
1330 $responses[] = new DAV\Xml\Element\Response(
1342 '{DAV:}multistatus',
1356 * {DAV:}href element, follow that property and grab additional elements
1373 '{DAV:}multistatus',
1374 new DAV\Xml\Response\MultiStatus($result),
1409 if (!$node[200][$propertyName] instanceof DAV\Xml\Property\Href) {
1419 'name' => '{DAV:}response',
1428 $result[] = new DAV\Xml\Element\Response($node['href'], $node);
1440 * {DAV:}principal-search-property-set report. This report returns a list
1442 * {DAV:}principal-property-search report.
1452 throw new DAV\Exception\BadRequest('This report is only defined when Depth: 0');
1459 $writer->startElement('{DAV:}principal-search-property-set');
1463 $writer->startElement('{DAV:}principal-search-property');
1464 $writer->startElement('{DAV:}prop');
1472 'name' => '{DAV:}description',
1495 * {DAV:}principal-property-search report. This report can be used for
1530 * This method is responsible for handling the {DAV:}acl-principal-prop-set
1547 throw new BadRequest('The {DAV:}acl-principal-prop-set REPORT only supports Depth 0');
1553 $acl = $this->server->getProperties($path, '{DAV:}acl');
1555 if (!$acl || !isset($acl['{DAV:}acl'])) {
1560 foreach ($acl['{DAV:}acl']->getPrivileges() as $ace) {
1563 // It's not a principal, it's one of the special rules such as {DAV:}authenticated
1589 * DAV\Browser\Plugin. This allows us to generate an interface users
1592 * @param DAV\INode $node
1596 function htmlActionsPanel(DAV\INode $node, &$output) {
1604 <input type="hidden" name="resourceType" value="{DAV:}principal" />
1606 <label>Display name:</label> <input type="text" name="{DAV:}displayname" /><br />