Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for acl and report method #207

Open
masx200 opened this issue May 16, 2020 · 6 comments
Open

Support for acl and report method #207

masx200 opened this issue May 16, 2020 · 6 comments

Comments

@masx200
Copy link

masx200 commented May 16, 2020

Support for acl and report method

https://www.ietf.org/rfc/rfc3744.html

@perry-mitchell
Copy link
Owner

@masx200 Could you be more specific? Would you have an example of what you want implemented?

@masx200

This comment has been minimized.

@masx200

This comment has been minimized.

@masx200
Copy link
Author

masx200 commented May 16, 2020

@masx200 Could you be more specific? Would you have an example of what you want implemented?

>> Request <<

   REPORT /users/ HTTP/1.1
   Host: www.example.com
   Content-Type: text/xml; charset=utf-8
   Content-Length: xxxx
   Depth: 0

   <?xml version="1.0" encoding="utf-8" ?>
   <D:principal-property-search xmlns:D="DAV:">
     <D:property-search>
       <D:prop>
         <D:displayname/>
       </D:prop>
       <D:match>doE</D:match>
     </D:property-search>
     <D:property-search>
       <D:prop xmlns:B="http://www.example.com/ns/">
         <B:title/>
       </D:prop>
       <D:match>Sales</D:match>
     </D:property-search>
     <D:prop xmlns:B="http://www.example.com/ns/">
       <D:displayname/>
       <B:department/>
       <B:phone/>
       <B:office/>
       <B:salary/>
     </D:prop>
   </D:principal-property-search>





>> 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:" xmlns:B="http://BigCorp.com/ns/">
     <D:response>
       <D:href>http://www.example.com/users/jdoe</D:href>
       <D:propstat>


<D:prop>
           <D:displayname>John Doe</D:displayname>
           <B:department>Widget Sales</B:department>
           <B:phone>234-4567</B:phone>
           <B:office>209</B:office>
         </D:prop>
         <D:status>HTTP/1.1 200 OK</D:status>
       </D:propstat>
       <D:propstat>
         <D:prop>
           <B:salary/>
         </D:prop>
         <D:status>HTTP/1.1 403 Forbidden</D:status>
       </D:propstat>
     </D:response>
     <D:response>
       <D:href>http://www.example.com/users/zsmith</D:href>
       <D:propstat>
         <D:prop>
           <D:displayname>Zygdoebert Smith</D:displayname>
           <B:department>Gadget Sales</B:department>
           <B:phone>234-7654</B:phone>
           <B:office>114</B:office>
         </D:prop>
         <D:status>HTTP/1.1 200 OK</D:status>
       </D:propstat>
       <D:propstat>
         <D:prop>
           <B:salary/>
         </D:prop>
         <D:status>HTTP/1.1 403 Forbidden</D:status>
       </D:propstat>
     </D:response>
   </D:multistatus>



@masx200
Copy link
Author

masx200 commented May 16, 2020

@masx200 Could you be more specific? Would you have an example of what you want implemented?

>> Request <<

   ACL /top/container/ HTTP/1.1
   Host: www.example.com
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx
   Authorization: Digest username="fielding",
     realm="[email protected]", nonce="...",
     uri="/top/container/", response="...", opaque="..."

   <?xml version="1.0" encoding="utf-8" ?>
   <D:acl xmlns:D="DAV:">
     <D:ace>
       <D:principal>
         <D:href>http://www.example.com/users/esedlar</D:href>
       </D:principal>
       <D:grant>
         <D:privilege><D:read/></D:privilege>
         <D:privilege><D:write/></D:privilege>
       </D:grant>
     </D:ace>
<D:ace>
       <D:principal>
         <D:property><D:owner/></D:property>
       </D:principal>
       <D:grant>
         <D:privilege><D:read-acl/></D:privilege>
         <D:privilege><D:write-acl/></D:privilege>
       </D:grant>
     </D:ace>
     <D:ace>
       <D:principal><D:all/></D:principal>
       <D:grant>
         <D:privilege><D:read/></D:privilege>
       </D:grant>
     </D:ace>
   </D:acl>
   >> Response <<

   HTTP/1.1 200 OK

>> Response <<

   HTTP/1.1 403 Forbidden
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxx

   <?xml version="1.0" encoding="utf-8" ?>
   <D:error xmlns:D="DAV:">
     <D:no-protected-ace-conflict/>
   </D:error>

@perry-mitchell
Copy link
Owner

I'd be happy to support such features, under the condition that the API is clear and concise and that tests are provided alongside. I'd happy accept a PR that covers this and adds documentation as to its use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants