arnaudq's blog
DAV:current-user-privilege-set
The DAV:current-user-privilege-set WebDAV ACL property allows a client application to know what operations the currently authenticated user can issue on a WebDAV resource (read, read-write, etc...).
Until now, I was under the impression that servers should return only the top level privileges (aggregate or not).
For example, given a server with the following supported set (note that DAV:all is not abstract):
[DAV:, all] (aggregate)
|
+-- [DAV:, read] (aggregate)
|
+-- [DAV:, read-acl] (abstract)
+-- [DAV:, read-current-user-privilege-set] (abstract)
|
+-- [DAV:, write] (aggregate)
|
+-- [DAV:, write-acl] (abstract)
+-- [DAV:, write-properties]
+-- [DAV:, write-content]
and a user with all rights on a resource, I was expecting the following DAV:current-user-privilege-set:
<D:current-user-privilege-set>
<D:privilege><D:all/></D:privilege>
</D:current-user-privilege-set>
But the WebDAV ACL specification clearly states that "Aggregate privileges and their contained privileges are listed". So what the server should return is really the full set:
<D:current-user-privilege-set>
<D:privilege><D:all/></D:privilege>
<D:privilege><D:read/></D:privilege>
<D:privilege><D:write/></D:privilege>
<D:privilege><D:write-properties/></D:privilege>
<D:privilege><D:write-content/></D:privilege>
</D:current-user-privilege-set>
I guess this makes client implementers life easier.
Posted at 03:15PM Nov 02, 2009 by arnaudq in CalDAV | Comments[3]