3744 Commits

Author SHA1 Message Date
Andrew Ruthven
2d477ec7fe Merge branch 'master' into multiple-email 2021-03-02 00:41:47 +13:00
Andrew Ruthven
7ecd0bc6d0 Add a regression test for new invalid user result from FreeBusy 2021-03-02 00:33:10 +13:00
Andrew Ruthven
bda3db6da8 Return a nicer error message if no user is found for Free/Busy via email
Previously a stack trace would be returned as the call to dav_name failed,
for example:

Exception [0] Can't calculate dav_name for unknown username
At line 382 of /usr/share/davical/inc/Principal.php
================= Stack Trace ===================
/usr/share/davical/htdocs/freebusy.php[49] Principal->dav_name()
2021-03-02 00:26:49 +13:00
Florian Schlichting
90bcfba683 Update carddav/2042-REPORT-addressbook-query together with df6ff3a in AWL 2021-03-01 13:55:15 +08:00
Andrew Ruthven
9cdeae54e2 Use the correct variable for PHP 2021-02-26 00:39:59 +13:00
Andrew Ruthven
52f1e341a6 Add test for performing Free/Busy with additional email address 2021-02-26 00:23:17 +13:00
Andrew Ruthven
3b9a383572 Update tests to work with new usr_emails table 2021-02-26 00:23:11 +13:00
Andrew Ruthven
1977e9f283 Update initial SQL to create usr_emails table.
I much prefer running patches to update the schema, but ah well.
2021-02-26 00:23:00 +13:00
Andrew Ruthven
6f1a20e1a2 If we already have the email address, don't need to do a DB query 2021-02-26 00:22:56 +13:00
Andrew Ruthven
cbd1d4f8ea searchEmails should return a boolean, and needs to be public. 2021-02-26 00:22:53 +13:00
Andrew Ruthven
1076fd5bfa Update some more uses of usr.email 2021-02-26 00:22:44 +13:00
Andrew Ruthven
cd4d0a6bf9 Avoid having multiple rows if a principal has more than one email address. 2021-02-26 00:22:31 +13:00
Andrew Ruthven
172e96a322 Correctly handle 'Apply changes' for email addresses.
Previously have applying a change, the screen would be refreshed
and the email address would still be getting edited. This correctly
refreshes the screen to show that the email address editing is finished.
2021-02-26 00:22:18 +13:00
Andrew Ruthven
d788bca04a Merge remote-tracking branch 'fsfs/multiple-email' into multiple-email-new 2021-02-26 00:19:45 +13:00
Andrew Ruthven
d3a7d10873 Merge branch 'master' into multiple-email-new 2021-02-26 00:18:53 +13:00
Florian Schlichting
e92e981542 Listing External Calendars is part of the Administration menu and should be restricted to admins
this could be made configurable, or lumped in with
$c->restrict_setup_to_admin, but non-admins only get here by manually
entering the URL...
2021-02-09 01:54:32 +08:00
Florian Schlichting
202e2edd5a tighten $c->list_everyone to look for DAV::read privilege and actually block access to principals and collections
Groups really only exist in the davical web interface, CALDAV clients
discover principals and collections based on GRANTs such as the
DAV::read privilege, so use that for the web interface as well.

Also, not listing users is nice, actually blocking access to those users
(which can be enumerated with the id GET parameter) is a lot better.
2021-02-09 01:54:32 +08:00
Klaus M Pfeiffer
042ce5f076 add feature list_everyone (fixes #59) 2021-02-08 17:41:28 +00:00
Florian Schlichting
5c2cb6c34a CI: run interop tests from carddavclient by Michael Stilkerich <ms@mike2k.de> 2021-02-08 19:08:28 +08:00
Florian Schlichting
5ee16172af Add tests for AWLs "Fix param-filter that checks if a parameter is defined" 2021-02-08 17:38:17 +08:00
Florian Schlichting
9d144cfe24 Add test for AWLs "Fix param-filter for multi-value parameters with TYPE=T1,T2 format" and update 2044 accordingly
2044 wants VCARDs with either TEL or EMAIL of TYPE=WORK. !20 correctly
splits the comma separated list of parameters so another two vCards
now correctly match (see also
https://gitlab.com/davical-project/awl/-/merge_requests/20#note_503183133)
2021-02-08 17:29:26 +08:00
Florian Schlichting
fd35aacb85 Add tests for AWLs "Fix GetProperties: Select properties with group prefix" 2021-02-08 17:29:26 +08:00
Florian Schlichting
56dc373a71 Add tests for AWLs "Fix: GetProperties must treat property names as case-insensitive" 2021-02-08 17:29:26 +08:00
Andrew Ruthven
a1395eae0f Only return the fields that we need for the test 2021-02-07 01:28:06 +13:00
Andrew Ruthven
8d7c8bafd1 CI: Compress the Apache log files 2021-02-06 21:51:31 +13:00
Andrew Ruthven
b8ce995ffa CI: Ensure DAViCal can write to log files
This appears to be causing PHP 8 to bomb out.
2021-02-06 21:09:33 +13:00
Andrew Ruthven
48fcc1f7b5 CI: Turn on debug logging for all the test runs 2021-02-06 20:49:59 +13:00
Andrew Ruthven
ccedbd1be9 Include the UID of the card which caused us to hit the RRULE limit
This will helpfully assist tracking down issues with recurrence rules.
2021-02-06 20:19:03 +13:00
Andrew Ruthven
dca1eb75da Enable debug logging in CI 2021-02-06 19:58:51 +13:00
Andrew Ruthven
d822cdf4d0 Only return what we're testing, makes it easier to understand regressions 2021-02-06 19:51:43 +13:00
Andrew Ruthven
31fbfe5d88 Add test for anyof 2021-02-06 19:46:35 +13:00
Florian Schlichting
097b415b42 fix display of email addresses for users other than admin
unfortunately, $id is a principal_id, not a user_no - these match only
for admin. Similar changes will be necessary for adding and updating an
email address.

changing the "primary" address does not work and may need some thought
wrt/ UNIQUE

the 'usr' table is actually from AWL, and no-one has done any schema
management there yet; however there's precedent in davical's
dba/patches/1.1.4.sql that that was just upgraded from davical...
2021-02-05 17:50:05 +08:00
Florian Schlichting
0a6d34a929 make db upgrade work
to use this branch:
===================

- git co master
- ./run_regression -> abort during tests
- git co multiple_email
- ./dba/update-davical-database --dbname=regression
2021-02-05 16:20:00 +08:00
Andrew Ruthven
ee8a751add WIP: Multiple emails for principles 2021-02-05 14:52:00 +08:00
Florian Schlichting
f476675b10 CI: do not clobber apache logs
and include "latestphp" in the test names
2021-02-05 11:34:25 +08:00
Florian Schlichting
f37fa814b6 update 2038-REPORT-addressbook-query after AWL's param-filter: fix a typo / explode multivalue commit
this refers to 6395cd1 in AWL

the added results seem correct, as they all have a TEL;TYPE=WORK
property
2021-02-05 02:05:05 +08:00
Florian Schlichting
ec234cda64 correct test results after AWL merges of mstilkerich/awl-fix_abookquery_paramnotdef and mstilkerich/awl-fix_support_anyof_propfilter 2021-02-05 02:01:09 +08:00
Florian Schlichting
b863c99601 add two more reports testing an allof prop-filter and an anyof text-match prop-filter
BUG: both results are incorrect as explained in the tests. I thought I
should nevertheless commit them to illustrate the fix.
2021-02-05 02:01:09 +08:00
Florian Schlichting
b4f8f5a6c1 cardquery: ensure restriction to target collection remains in force even when we find that we need a post_filter step and thus throw away the SQL
this ensures a sane (but still wrong) result for
carddav/2051-REPORT-carddavclient-ParamNotDefinedSome
2021-02-05 02:01:09 +08:00
Florian Schlichting
6e87a1443c add a REPORT for a property with multiple values, not all of which match the is-not-defined filter (carddavclient's ParamNotDefinedSome test)
BUG: as explained in the test, this should not match Jonny2; and it
should most certainly not match those other VCARDs from a different
user's collections!
2021-02-05 02:01:09 +08:00
Florian Schlichting
57f0bc6e41 add 4 VCARDs from carddavclient AddressbookQueryTest
we will run these tests in user5's addresses
2021-02-05 02:00:42 +08:00
Andrew Ruthven
f94b000cc1 Correctly exclude cards where TYPE is not set on TEL records.
Commit f1bc3b0dc00d42bb6c3053559230690ae1a6745b in AWL fixed this behaviour.
2021-02-04 23:14:49 +13:00
Andrew Ruthven
963772a0f0 Fix the test result and hopefully make the description clearer 2021-02-04 23:08:05 +13:00
Andrew Ruthven
7c37035201 I always get whitespace changes 2021-02-04 22:20:19 +13:00
Andrew Ruthven
55fde81b50 Add a bit more info about various suites, and how to time timezone 2021-02-04 22:15:10 +13:00
Andrew Ruthven
b00fc5d5e6 Merge remote-tracking branch 'origin/master' 2021-02-04 22:09:18 +13:00
Florian Schlichting
75f62a81f6 fix PHP8 deprecation warnings: "Required parameter X follows optional parameter Y"
Deprecated: Required parameter $username follows optional parameter $attributes in inc/drivers_ldap.php on line 190
Deprecated: Required parameter $passwd follows optional parameter $attributes in inc/drivers_ldap.php on line 190
Deprecated: Required parameter $ua_string follows optional parameter $min_age in inc/external-fetch.php on line 42

As explained in https://www.php.net/manual/en/migration80.deprecated.php,
    If a parameter with a default value is followed by a required
    parameter, the default value has no effect. This is deprecated as of
    PHP 8.0.0 and can generally be resolved by dropping the default
    value, without a change in functionality
2021-02-03 23:25:51 +08:00
Jan Hicken
6cdbfcf226 Add default value for errcontext variable in error handler function
This variable is no longer passed in PHP 8.0.

It cannot be removed however, because it would not be backwards
compatible.
2021-02-03 14:57:57 +00:00
Jan Hicken
f376be164e Use brackets instead of curly braces for string offset access
Curly braces have been deprecated in PHP 7.4 and unsupported in PHP 8.0.
2021-02-03 14:57:57 +00:00
Florian Schlichting
39bfe88887 CI: add build_buster_latestphp
this helps to identify issues with new PHP versions before they appear
in Debian

note: debuild sanitizes PATH, needs --prepend-path=/usr/local/bin so
that the (non-Debian) php cli can be found
2021-02-03 22:39:18 +08:00