Merge branch 'master' of github.com:DAViCal/davical into github
[davical.git] / testing / tests / regression-suite / 0947-ACL.test
bloba9ff02279067d97b901009fec5fcde36fe6f9e5f
2 # ACL setting default privileges on a collection to nothing, and
3 #     specific privileges to include read-acl.
5 TYPE=ACL
6 URL=http://regression.host/caldav.php/user1/
7 HEADER=User-Agent: RFC3744 Spec Tests
8 HEADER=Content-Type: text/xml; charset="UTF-8"
9 HEAD
12 BEGINDATA
13 <?xml version="1.0" encoding="utf-8" ?>
14 <acl xmlns="DAV:" xmlns:CalDAV="urn:ietf:params:xml:ns:caldav">
15   <ace>
16     <principal>
17       <href>/caldav.php/user4/</href>
18     </principal>
19     <grant>
20       <privilege><read/></privilege>
21       <privilege><read-current-user-privilege-set/></privilege>
22       <privilege><CalDAV:read-free-busy/></privilege>
23       <privilege><CalDAV:schedule-query-freebusy/></privilege>
24     </grant>
25   </ace>
26   <ace>
27     <principal><authenticated/></principal>
28     <grant>
29       <privilege/>
30     </grant>
31   </ace>
32 </acl>
33 ENDDATA
35 QUERY
36 SELECT by_principal, by_collection, privileges, p_to.displayname, to_principal
37    FROM grants JOIN dav_principal p_to ON (to_principal=principal_id)
38           LEFT JOIN collection ON (by_collection=collection.collection_id)
39           LEFT JOIN dav_principal p_by ON (by_principal=p_by.principal_id)
40   WHERE p_by.dav_name = '/user1/'
41   ORDER BY by_principal, to_principal
42 ENDQUERY