From 515a31bbc8622c08796a22a3e1383b2ade5cac2f Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 6 Nov 2010 19:02:55 +1300 Subject: [PATCH] Add the ACL to the supported methods. --- inc/DAVResource.php | 8 ++++++-- testing/tests/carddav/2011-PROPFIND.result | 14 +++++--------- testing/tests/carddav/2011-PROPFIND.test | 3 ++- .../carddav/2030-REPORT-addressbook-query.result | 9 +-------- .../carddav/2030-REPORT-addressbook-query.test | 3 ++- .../regression-suite/0101-Evo-OPTIONS-1.result | 2 +- .../regression-suite/0201-Moz-OPTIONS-2.result | 2 +- .../0222-Moz-OPTIONS-allowed.result | 2 +- .../0224-Moz-OPTIONS-principal.result | 8 ++++++++ .../0225-Moz-OPTIONS-group-principal.result | 8 ++++++++ .../0302-Chandler-OPTIONS-2.result | 2 +- .../regression-suite/0400-Cadaver-OPTIONS-1.result | 2 +- .../regression-suite/0601-Soho-OPTIONS.result | 2 +- .../regression-suite/0910-Space-OPTIONS.result | 2 +- .../0917-PROPFIND-supported-stuff.result | 7 ++++--- .../0918-PROPFIND-supported-stuff.result | 5 +++-- .../0919-PROPFIND-supported-stuff.result | 5 +++-- .../tests/regression-suite/Create-Database.result | 2 +- 18 files changed, 50 insertions(+), 36 deletions(-) diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 8342986c..6b1b7dc0 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -588,7 +588,7 @@ EOQRY; if ( $this->IsPrincipal() ) { if ( !isset($this->principal) ) $this->FetchPrincipal(); $this->privileges = $this->principal->Privileges(); - dbg_error_log( 'DAVResource', 'Privileges of "%s" for user accessing "%s"', $this->privileges, $this->principal->username() ); + dbg_error_log( 'DAVResource', 'Privileges of "%s" for user accessing principal "%s"', $this->privileges, $this->principal->username() ); return; } @@ -728,17 +728,21 @@ EOQRY; $this->supported_methods['HEAD'] = ''; $this->supported_methods['MKTICKET'] = ''; $this->supported_methods['DELTICKET'] = ''; + $this->supported_methods['ACL'] = ''; break; case 'collection': $this->supported_methods['MKTICKET'] = ''; $this->supported_methods['DELTICKET'] = ''; + $this->supported_methods['BIND'] = ''; + $this->supported_methods['ACL'] = ''; case 'principal': $this->supported_methods['GET'] = ''; - $this->supported_methods['PUT'] = ''; $this->supported_methods['HEAD'] = ''; $this->supported_methods['MKCOL'] = ''; $this->supported_methods['MKCALENDAR'] = ''; $this->supported_methods['PROPPATCH'] = ''; + $this->supported_methods['BIND'] = ''; + $this->supported_methods['ACL'] = ''; break; } } diff --git a/testing/tests/carddav/2011-PROPFIND.result b/testing/tests/carddav/2011-PROPFIND.result index e7877fbe..c55170a9 100644 --- a/testing/tests/carddav/2011-PROPFIND.result +++ b/testing/tests/carddav/2011-PROPFIND.result @@ -1,17 +1,11 @@ -HTTP/1.1 207 Multi-Status -Date: Dow, 01 Jan 2000 00:00:00 GMT -DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule -DAV: extended-mkcol, calendar-proxy, bind, addressbook -ETag: "d65a1dbcd03e14e0d6a3102ba0f1876a" -Content-Length: 794 -Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/addressbook/ - + + Dow, 01 Jan 2000 00:00:00 GMT + HTTP/1.1 200 OK @@ -26,6 +20,7 @@ Content-Type: text/xml; charset="utf-8" "24bae2a7f81c0a79413a656c06d8326b" + Dow, 01 Jan 2000 00:00:00 GMT HTTP/1.1 200 OK @@ -35,6 +30,7 @@ Content-Type: text/xml; charset="utf-8" "fada70a725708bce8521efb87acfa629" + Dow, 01 Jan 2000 00:00:00 GMT HTTP/1.1 200 OK diff --git a/testing/tests/carddav/2011-PROPFIND.test b/testing/tests/carddav/2011-PROPFIND.test index 03ec3ed2..8e10504b 100644 --- a/testing/tests/carddav/2011-PROPFIND.test +++ b/testing/tests/carddav/2011-PROPFIND.test @@ -7,7 +7,7 @@ URL=http://mycaldav/caldav.php/user1/addressbook/ HEADER=User-Agent: DAViCalTester/public HEADER=Content-Type: text/xml HEADER=Depth: 1 -HEAD +# HEAD BEGINDATA @@ -15,6 +15,7 @@ BEGINDATA + ENDDATA diff --git a/testing/tests/carddav/2030-REPORT-addressbook-query.result b/testing/tests/carddav/2030-REPORT-addressbook-query.result index c43b8b73..543d103f 100644 --- a/testing/tests/carddav/2030-REPORT-addressbook-query.result +++ b/testing/tests/carddav/2030-REPORT-addressbook-query.result @@ -1,11 +1,3 @@ -HTTP/1.1 207 Multi-Status -Date: Dow, 01 Jan 2000 00:00:00 GMT -DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule -DAV: extended-mkcol, calendar-proxy, bind, addressbook -ETag: "8c1e871ceac19694850a8898e844d4b4" -Content-Length: 655 -Content-Type: text/xml; charset="utf-8" - @@ -23,6 +15,7 @@ FN:Andrew Watson McMillan NICKNAME:karora END:VCARD + Dow, 01 Jan 2000 00:00:00 GMT HTTP/1.1 200 OK diff --git a/testing/tests/carddav/2030-REPORT-addressbook-query.test b/testing/tests/carddav/2030-REPORT-addressbook-query.test index 3d9beed2..3726706a 100644 --- a/testing/tests/carddav/2030-REPORT-addressbook-query.test +++ b/testing/tests/carddav/2030-REPORT-addressbook-query.test @@ -8,7 +8,7 @@ HEADER=Accept: text/xml,application/xml HEADER=Content-Type: text/xml HEADER=Depth: 1 -HEAD +# HEAD BEGINDATA @@ -24,6 +24,7 @@ BEGINDATA + diff --git a/testing/tests/regression-suite/0101-Evo-OPTIONS-1.result b/testing/tests/regression-suite/0101-Evo-OPTIONS-1.result index be1fbe30..e75f50ac 100644 --- a/testing/tests/regression-suite/0101-Evo-OPTIONS-1.result +++ b/testing/tests/regression-suite/0101-Evo-OPTIONS-1.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0201-Moz-OPTIONS-2.result b/testing/tests/regression-suite/0201-Moz-OPTIONS-2.result index be1fbe30..e75f50ac 100644 --- a/testing/tests/regression-suite/0201-Moz-OPTIONS-2.result +++ b/testing/tests/regression-suite/0201-Moz-OPTIONS-2.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0222-Moz-OPTIONS-allowed.result b/testing/tests/regression-suite/0222-Moz-OPTIONS-allowed.result index 23a74641..d72def2a 100644 --- a/testing/tests/regression-suite/0222-Moz-OPTIONS-allowed.result +++ b/testing/tests/regression-suite/0222-Moz-OPTIONS-allowed.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKCOL, MKCALENDAR, PROPPATCH +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, HEAD, MKCOL, MKCALENDAR, PROPPATCH, BIND, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0224-Moz-OPTIONS-principal.result b/testing/tests/regression-suite/0224-Moz-OPTIONS-principal.result index e69de29b..d72def2a 100644 --- a/testing/tests/regression-suite/0224-Moz-OPTIONS-principal.result +++ b/testing/tests/regression-suite/0224-Moz-OPTIONS-principal.result @@ -0,0 +1,8 @@ +HTTP/1.1 200 OK +Date: Dow, 01 Jan 2000 00:00:00 GMT +DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule +DAV: extended-mkcol, calendar-proxy, bind, addressbook +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, HEAD, MKCOL, MKCALENDAR, PROPPATCH, BIND, ACL +Content-Length: 0 +Content-Type: text/plain; charset="utf-8" + diff --git a/testing/tests/regression-suite/0225-Moz-OPTIONS-group-principal.result b/testing/tests/regression-suite/0225-Moz-OPTIONS-group-principal.result index e69de29b..d72def2a 100644 --- a/testing/tests/regression-suite/0225-Moz-OPTIONS-group-principal.result +++ b/testing/tests/regression-suite/0225-Moz-OPTIONS-group-principal.result @@ -0,0 +1,8 @@ +HTTP/1.1 200 OK +Date: Dow, 01 Jan 2000 00:00:00 GMT +DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule +DAV: extended-mkcol, calendar-proxy, bind, addressbook +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, HEAD, MKCOL, MKCALENDAR, PROPPATCH, BIND, ACL +Content-Length: 0 +Content-Type: text/plain; charset="utf-8" + diff --git a/testing/tests/regression-suite/0302-Chandler-OPTIONS-2.result b/testing/tests/regression-suite/0302-Chandler-OPTIONS-2.result index be1fbe30..e75f50ac 100644 --- a/testing/tests/regression-suite/0302-Chandler-OPTIONS-2.result +++ b/testing/tests/regression-suite/0302-Chandler-OPTIONS-2.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0400-Cadaver-OPTIONS-1.result b/testing/tests/regression-suite/0400-Cadaver-OPTIONS-1.result index be1fbe30..e75f50ac 100644 --- a/testing/tests/regression-suite/0400-Cadaver-OPTIONS-1.result +++ b/testing/tests/regression-suite/0400-Cadaver-OPTIONS-1.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0601-Soho-OPTIONS.result b/testing/tests/regression-suite/0601-Soho-OPTIONS.result index 23a74641..d72def2a 100644 --- a/testing/tests/regression-suite/0601-Soho-OPTIONS.result +++ b/testing/tests/regression-suite/0601-Soho-OPTIONS.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKCOL, MKCALENDAR, PROPPATCH +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, HEAD, MKCOL, MKCALENDAR, PROPPATCH, BIND, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0910-Space-OPTIONS.result b/testing/tests/regression-suite/0910-Space-OPTIONS.result index be1fbe30..e75f50ac 100644 --- a/testing/tests/regression-suite/0910-Space-OPTIONS.result +++ b/testing/tests/regression-suite/0910-Space-OPTIONS.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET +Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKTICKET, DELTICKET, ACL Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/regression-suite/0917-PROPFIND-supported-stuff.result b/testing/tests/regression-suite/0917-PROPFIND-supported-stuff.result index 8f71da4b..516898e7 100644 --- a/testing/tests/regression-suite/0917-PROPFIND-supported-stuff.result +++ b/testing/tests/regression-suite/0917-PROPFIND-supported-stuff.result @@ -2,8 +2,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -ETag: "6b4e073faec32eb35d9de94349f13161" -Content-Length: 1574 +ETag: "3447a04184df5d673f50e8c7a0952a68" +Content-Length: 1611 Content-Type: text/xml; charset="utf-8" @@ -26,11 +26,12 @@ Content-Type: text/xml; charset="utf-8" - + + diff --git a/testing/tests/regression-suite/0918-PROPFIND-supported-stuff.result b/testing/tests/regression-suite/0918-PROPFIND-supported-stuff.result index 7fc03344..eb3f67be 100644 --- a/testing/tests/regression-suite/0918-PROPFIND-supported-stuff.result +++ b/testing/tests/regression-suite/0918-PROPFIND-supported-stuff.result @@ -2,8 +2,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -ETag: "c0a1811cd91f4f840744ddfb3da067a3" -Content-Length: 2120 +ETag: "9750b11e4998e1538b7bb3626ae19b39" +Content-Length: 2156 Content-Type: text/xml; charset="utf-8" @@ -31,6 +31,7 @@ Content-Type: text/xml; charset="utf-8" + diff --git a/testing/tests/regression-suite/0919-PROPFIND-supported-stuff.result b/testing/tests/regression-suite/0919-PROPFIND-supported-stuff.result index 91674cd4..566a85b8 100644 --- a/testing/tests/regression-suite/0919-PROPFIND-supported-stuff.result +++ b/testing/tests/regression-suite/0919-PROPFIND-supported-stuff.result @@ -2,8 +2,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook -ETag: "88df59252290d58630f83da5be2a6405" -Content-Length: 1663 +ETag: "98ceb8bb48fbdd547226d0b28aadd942" +Content-Length: 1699 Content-Type: text/xml; charset="utf-8" @@ -30,6 +30,7 @@ Content-Type: text/xml; charset="utf-8" + diff --git a/testing/tests/regression-suite/Create-Database.result b/testing/tests/regression-suite/Create-Database.result index e9c60e92..0852a23a 100644 --- a/testing/tests/regression-suite/Create-Database.result +++ b/testing/tests/regression-suite/Create-Database.result @@ -7,7 +7,7 @@ RRULE functions updated. Database permissions updated. NOTE ==== -* The password for the 'admin' user has been set to 'nimda'" +* The password for the 'admin' user has been set to 'nimda' Thanks for trying DAViCal! Check in /usr/share/doc/davical/examples/ for some configuration examples. For help, visit #davical on irc.oftc.net.