W3C home > Mailing lists > Public > ietf-dav-versioning@w3.org > April to June 2001

A DAV:principal-match REPORT

From: Clemm, Geoff <gclemm@rational.com>
Date: Tue, 12 Jun 2001 15:35:49 -0400
Message-ID: <3906C56A7BD1F54593344C05BD1374B1018E2463@SUS-MA1IT01>
To: "DeltaV (E-mail)" <ietf-dav-versioning@w3.org>
A very useful request is "find all resources in this collection
that I own".  Currently, there is no interoperable way to do this
in the ACL protocol.  To remedy this situation, I propose that we
add a DAV:principal-match REPORT:

------------------------------------

9	ACCESS CONTROL REPORTS

9.1	DAV:principal-match REPORT

The DAV:principal-match REPORT is used to identify all members of a
collection that have a specified relationship with the current user.
In particular, if the collection contains principals, the report can
be used to identify all members of the collection that match the
current user.  Alternatively, if the collection contains resources
that have a property that identifies a principal (e.g. DAV:owner),
then the report can be used to identify all members of the collection
whose property identifies a principal that matches the current user.

Marshalling:

The request body MUST be a DAV:principal-match XML element.

<!ELEMENT principal-match ((principal-property|self), prop)>
<!ELEMENT principal-match ANY>
ANY value: an element whose type identifies a property
<!ELEMENT self EMPTY>
prop: see RFC 2518, Section 12.11

The response body for a successful request MUST be a DAV:multistatus
XML element.

multistatus: see RFC 2518, Section 12.9

The response body for a successful DAV:principal-match REPORT request
MUST contain a DAV:response element for each member of the collection
that has the specified relationship with the current user.  If
DAV:prop is specified in the request body, the properties specified in
the DAV:prop element MUST be reported in the DAV:response elements.

9.1.1	Example - DAV:principal-match REPORT

The following example identifies the members of the /doc
collection that are owned by the current user.
     
>>REQUEST

  REPORT /doc HTTP/1.1
  Host: www.webdav.org
  Content-Type: text/xml; charset="utf-8"
  Content-Length: xxxx 

  <?xml version="1.0" encoding="utf-8" ?>
  <D:principal-match xmlns:D="DAV:">
    <D:principal-property>
      <D:owner/>
    </D:principal-property>
  </D:principal-match>

>>RESPONSE

  HTTP/1.1 207 Multi-Status
  Content-Type: text/xml; charset="utf-8"
  Content-Length: xxxx

  <?xml version="1.0" encoding="utf-8" ?>
  <D:multistatus xmlns:D="DAV:">
    <D:response>
      <D:href>http://www.webdav.org/doc/foo.html</D:href>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:response>
    <D:response>
      <D:href>http://www.webdav.org/doc/img/bar.gif</D:href>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:response>
  </D:multistatus>

------------------------------------

Comments?

Cheers,
Geoff
Received on Tuesday, 12 June 2001 15:30:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 13:57:41 GMT