Commit Graph
3597 Commits
Author SHA1 Message Date
Jamie McClymont a4c9718bb2 Add Gitlab CI
Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-30 15:59:04 +13:00
Jamie McClymont 0e0a07eb30 Fix returning dead properties in an allprop PROPFIND
dead_properties is an assoc.array from name to value, but it was being merged
with simple arrays of property names.

This means that tests 0824 and 0828 now actually return the dead properties, so
I've updated those result files.

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-30 15:59:04 +13:00
Andrew Ruthven 8c01c83e4b Ignore the id in our test comparision
Gitlab CI has a different collection_id for US Holidays than running
the tests locally. We don't actually care about ID for this test,
just the fact that the binding is present is enough for us.
2018-11-30 15:02:53 +13:00
Andrew Ruthven 0c074e4348 Explicitly set the Charset to use, and look for the usual format.
In the GitLab CI environment, the command:

@header("Content-Type: text/plain");

Generates the Content-Type line of:

Content-Type: text/plain; charset=UTF-8

But on my workstation it generates this:

Content-Type: text/plain;charset=UTF-8

By adding that charset to our call to @header, we receive a
predictable result.
2018-11-29 13:40:12 +13:00
Andrew Ruthven 9d2969982c Exclude the ctags from the test
We don't really care about the ctag in this test, and the ctag
for user1 will change from test run to test run.
2018-11-29 13:24:25 +13:00
Andrew Ruthven 46c76c645f Atually, options aren't supported on the end of REPLACE 2018-11-29 13:20:44 +13:00
Andrew Ruthven bdc480b785 Merge branch 'freebusy-no-ci' into 'master'
Correctly place floating events in freebusy

Closes #169 and #146

See merge request davical-project/davical!57
2018-11-13 22:19:49 +00:00
Andrew Ruthven 12565cb6bd Make the tests more interesting by using ctag 2018-11-12 20:14:40 +13:00
Andrew Ruthven deb743fdcf Add tests for: Fix Fatal PHP Error if Depth is more than 1.
I'm not 100% this is working as intended, but it does kind
of make sense.
2018-11-12 20:00:20 +13:00
Andrew Ruthven 48efbb272b Fix Fatal PHP Error if Depth is more than 1.
Merge request was proposed by xhess on GitLab, but the commit
had no content. I've solved it, possibly the same way.

For the initial commit:
Executing the second example at https://wiki.davical.org/index.php?title=PROPFIND
The "Depth: 2" header is the problem. Setting the depth header larger than 1
causes the function "compare_val_with_re" to be defined again. Now checking if
the function has already been defined fixes the problem.
2018-11-12 19:32:34 +13:00
Andrew Ruthven 872f4fc6ad Allow over riding the value of ALLSUITES 2018-11-12 18:33:01 +13:00
Andrew Ruthven a394c73cc4 This looks like an acceptable change 2018-11-12 18:31:28 +13:00
Andrew Ruthven 95ad5ec373 Allow database dumps to be restored in test suite.
Primary fix is the search_path to ensure that the collection table
is in the search path so that the copy into dav_binding (and
possibly others) will work.

I also suppressed the warning about plpgsql.
2018-11-12 18:00:30 +13:00
Andrew Ruthven b0a1c9212d Ignore the PostgreSQL version for tests
This just creates bogus test result diffs.
2018-11-12 17:59:51 +13:00
Jamie McClymont ec67b28bf0 Guess the timezone of non-all-day floating events in freebusy
Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-09 15:41:02 +13:00
Jamie McClymont 91aaf48648 Guess the timezone of VALUE=DATE events in freebusy
Resolves #146
2018-10-31 12:09:45 +13:00
Andrew Ruthven bc61d51f5b Test that max-resource-size is infinity.
Commit 9a430130d8 removed the limit,
update the regression tests to reflect this.
2018-10-02 19:55:25 +13:00
Andrew Ruthven 2873c89149 Fix a typo of this.
Closes #145
2018-10-02 19:53:44 +13:00
Paul Kallnbach 9a430130d8 increase maximum resource size to infinity. this might be potentially dangerous but it is what's claimed in inc/caldav-MKCOL.php:
case 'urn:ietf:params:xml:ns:caldav:max-resource-size':  /** Ignored, since we will support arbitrary size */
this solves issue #80 (large contact photos not being accepted by the server). we might wanna think about a larger limit instead, e.g. increase the limit from 65kB to 6.5MB
2018-05-22 15:17:28 +00:00
Florian Schlichting 5801916722 Merge branch 'awl_appuser-awl_dbauser' into 'master'
Allow user to define awl_appuser and awl_dbauser on create-database script

See merge request davical-project/davical!48
2018-04-25 16:25:06 +00:00
Florian Schlichting 04bf91cf5c Merge branch 'php4-constructor-removal' into 'master'
replace php4 style constructors with __construct

See merge request davical-project/davical!50
2018-04-25 16:08:05 +00:00
Florian Schlichting b3c9480b6e Merge branch 'patch-1' into 'master'
Fix a typo in DAV_AllProperties which caused dead properties to be omitted

See merge request davical-project/davical!51
2018-04-25 16:02:06 +00:00
wmbr fc37b68461 Fix a typo in DAV_AllProperties which caused dead properties to be omitted 2018-04-25 00:50:53 +00:00
Till Schäfer 26bab04599 replace php4 style constructors with __construct 2018-03-21 16:59:35 +01:00
Antoine c2254d7682 Allow user to define awl_appuser and awl_dbauser on create-database script 2018-02-21 12:36:03 +01:00
Florian Schlichting d459b489ac external fetch: improve error reporting 2018-01-13 23:46:46 +01:00
Florian Schlichting 81874649f7 external fetch: handle initial NULL of collection.modified 2018-01-13 23:22:12 +01:00
Florian Schlichting 05397d635c release 1.1.6 r1.1.7 2018-01-12 00:15:36 +01:00
Florian Schlichting 59b4c2c8ed switch to doxygen for api docs 2018-01-11 23:43:25 +01:00
Florian Schlichting b8df885484 put the most important debug options in a more visible place 2018-01-11 23:36:16 +01:00
Frank Steinberg 9363a3d19a Improved handling of event modifications:
- only some event attributes modified by the organizer get also modified in attendees' instances of the event,
- revoked invitations mark the according attendee's event appropriately,
- a changed event time resets all attendees' PARTSTAT to NEEDS-ACTION.
2018-01-11 23:08:17 +01:00
Florian Schlichting 4e5d3ceda4 update unit test due to previous commit 2018-01-11 22:13:07 +01:00
Andrew McMillan 5edf66321d Fix common etag match code, use it everywhere. 2018-01-10 21:50:55 +00:00
Andrew McMillan 0966e5ce68 Tidy up some PHPdoc in DAVResource 2018-01-10 21:50:39 +00:00
Florian Schlichting db709ddebd Merge branch 'ldap-uid-vs-cn' into 'master'
LDAP: any 'dn' compatibility

See merge request davical-project/davical!43
2018-01-10 21:39:21 +00:00
Florian Schlichting a4940ac1e3 Merge branch 'ldap-sync-activate-users' into 'master'
LDAP: sync re-activate users

See merge request davical-project/davical!42
2018-01-10 21:36:10 +00:00
Andrew McMillan ce19c87208 Merge branch 'correct-duration-handling' into 'master'
Correctly handle durations without units like "PT"

Closes #136

See merge request davical-project/davical!41
2018-01-10 21:35:44 +00:00
Jean-Baptiste Guerraz 79acc80eb7 use php ldap explode in order to be compatible with any dn 2018-01-10 17:00:13 +01:00
Jean-Baptiste Guerraz 0fa38c8580 sync ldap user - reactivate 2018-01-10 15:55:26 +01:00
Andrew McMillan 58cf5b01ad Correctly handle durations without units like "PT"
While this has always been handled in basic event parsing the handling
in VALARM components for related triggers was missing.
2018-01-10 14:10:12 +00:00
Florian Schlichting bc9c39c455 add regression tests for iCal handling calendar delegations 2018-01-09 23:11:04 +01:00
Florian Schlichting 4335e790d1 drop tests/regression-suite/0528, same as 0527 2018-01-09 22:15:29 +01:00
Florian Schlichting 8b9b8ed244 rename DAVResource->_is_proxy_request to _is_proxy_resource 2018-01-09 22:15:29 +01:00
Florian Schlichting e417061f29 Finally: implement managing calendar delegations from iCal
This is done with a PROPPATCH to the user's calendar-proxy-read or
calendar-proxy-write pseudo-collection, listing the new delegates inside
the group-member-set tag.

See https://github.com/apple/ccs-calendarserver/blob/master/doc/Extensions/caldav-proxy.txt
2018-01-09 22:15:18 +01:00
Florian Schlichting 17c2022122 group-member-set and group-membership queries on proxy resources should be handled in DAVResource
Otherwise we cannot be sure if the resource we are looking at is a
proxy. Looking at the request as we did in DAVPrincipal is wrong, as one
request can result in several resources to be examined, only some of
which may be proxies.

BTW looking at the regression test changes, I'm not sure having
calendar-proxy-read-for on proxy principals is correct, but caldav-proxy
seems to have nothing to say on that so we leave it for now.
2018-01-09 22:11:30 +01:00
Florian Schlichting 6687bdcf03 update regression tests due to FetchProxyGroups changes 2018-01-09 01:30:38 +01:00
Florian Schlichting ded783a603 DAVPrincipal->FetchProxyGroups(): disable grants_proxy_access_from_p()
I just don't get how it's supposed to work, but it doesn't seem to
return the expected proxy delegates. This SQL doesn't expand groups,
which is a feature, and in general we only look at the grants table and
completely disregard any default privileges the principal might have
set.
2018-01-09 01:30:18 +01:00
Florian Schlichting 7181e466eb DAVPrincipal->FetchProxyGroups(): invert arguments to pprivs()
this needs to be the other way round than above
2018-01-09 01:04:16 +01:00
Florian Schlichting 83e9106160 add DAVResource->IsProxyCollection() 2018-01-08 23:10:23 +01:00
Florian Schlichting a7ba436f2f advertise support for principal-match REPORT
and a few more bits inspired by CalDAV/aclreports.xml:
    - strict Depth header checking
    - principal-match: match on dav_name if not $match_self
    - principal-match can "alternatively" return resources in a collection
      that belong to a principal, like a user's calendars when we query
      the principal URI
2018-01-08 22:51:22 +01:00