Question

What command do we use on a WebDAV resource (such as a folder or file) to check if the user has 'write' or 'read-only' permission for that particular resource?

Was it helpful?

Solution

'Plain webdav' doesn't have a way to get this information, other than trying the request and see if it fails.

CalDAV servers tend to have support for WebDAV ACL. (although not all of them though). If they do, you can find out what kind of permissions you have by requesting the current-user-privilege-set property using PROPFIND.

PROPFIND /url HTTP/1.1
Host: blabla

<?xml version="1.0"?>
<propfind xmlns="DAV:">
   <prop>
      <current-user-privilege-set />
   </prop>
</propfind>

The above request is completely from memory, so there might be mistakes.

Hope this helps,

Evert

OTHER TIPS

The WebDAV ACL scheme is documented in RFC3744; the previous post is the correct direction to go. Privileges are described in the RFC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top