Coleman Watts [Mon, 22 Feb 2021 03:58:59 +0000 (22:58 -0500)]
Afform Admin - Ensure buttons have 'type' declared
Coleman Watts [Mon, 22 Feb 2021 02:50:14 +0000 (21:50 -0500)]
Afform - Add 'View Page' link from afform edit screen
Monish Deb [Mon, 22 Feb 2021 00:59:37 +0000 (06:29 +0530)]
Merge pull request #19605 from eileenmcnaughton/money
dev/translation#65 Further remove moneyValueFormat
Eileen McNaughton [Sun, 21 Feb 2021 21:56:51 +0000 (10:56 +1300)]
Merge pull request #19626 from colemanw/multiRecordCustomViewLink
SearchKit - Add links to view multi-record custom data
Eileen McNaughton [Sun, 21 Feb 2021 21:49:25 +0000 (10:49 +1300)]
Merge pull request #19618 from colemanw/searchAliasFix
dev/core#2388 SearchKit - Fix display of pseudoconstant fields
Eileen McNaughton [Sun, 21 Feb 2021 19:59:51 +0000 (08:59 +1300)]
Merge pull request #19640 from mattwire/tokendeprecated
Remove single use of extraParams in CRM_Utils_Token::getTokenDetails()
Matthew Wire [Sun, 21 Feb 2021 17:32:07 +0000 (17:32 +0000)]
Remove single use of extraParams in CRM_Utils_Token::getTokenDetails()
Eileen McNaughton [Sun, 21 Feb 2021 10:50:45 +0000 (23:50 +1300)]
Merge pull request #19609 from demeritcowboy/case-views
[NFC/Unit Test] dev/core#2385 - Add test for getCaseActivityQuery
Eileen McNaughton [Sun, 21 Feb 2021 00:36:32 +0000 (13:36 +1300)]
Merge pull request #19348 from sunilpawar/dev_age_at_deceased_date
Show Contact age on deceased date
Eileen McNaughton [Sat, 20 Feb 2021 22:57:14 +0000 (11:57 +1300)]
Merge pull request #19637 from demeritcowboy/static-event
dev/event#50 - Non static function called statically for event ical downloads
demeritcowboy [Sat, 20 Feb 2021 14:15:36 +0000 (09:15 -0500)]
non static function called statically
Eileen McNaughton [Fri, 19 Feb 2021 23:04:00 +0000 (12:04 +1300)]
Merge pull request #19631 from colemanw/searchKitLinks
SearchKit - Enable links for implicit joins
Eileen McNaughton [Fri, 19 Feb 2021 22:53:13 +0000 (11:53 +1300)]
Merge pull request #19636 from demeritcowboy/saventest
dev/core#2398 - Fix save'n'test button on mail account form
Eileen McNaughton [Fri, 19 Feb 2021 21:35:00 +0000 (10:35 +1300)]
Merge pull request #19620 from colemanw/searchKitSelectCurrentUser
Search kit select current user
colemanw [Fri, 19 Feb 2021 20:53:50 +0000 (15:53 -0500)]
Merge pull request #19597 from eileenmcnaughton/nfc
[REF] simplify parameter, use preferred strict
Eileen McNaughton [Fri, 19 Feb 2021 20:47:28 +0000 (09:47 +1300)]
Merge pull request #19608 from totten/master-wp-status
WordPress - If we hit a "permission denied" error, return HTTP 403
Eileen McNaughton [Fri, 19 Feb 2021 20:20:12 +0000 (09:20 +1300)]
Merge pull request #19625 from colemanw/fixTs
Fix incorrect use of ts when setting custom data form title
demeritcowboy [Fri, 19 Feb 2021 19:08:34 +0000 (14:08 -0500)]
fix save'n'test button
Seamus Lee [Fri, 19 Feb 2021 08:19:54 +0000 (19:19 +1100)]
Merge pull request #19634 from eileenmcnaughton/iif
dev/financial#166 Clean up money formatting in iif
Seamus Lee [Fri, 19 Feb 2021 07:56:27 +0000 (18:56 +1100)]
Merge pull request #19627 from colemanw/readonly
Metadata - Add 'readonly' to id fields, custom fields & contact fields
eileen [Fri, 19 Feb 2021 07:02:10 +0000 (20:02 +1300)]
dev/financial#166 Clean up money formatting in iif
This does not turn out to be necessary but I tested & it works & is more correct
Seamus Lee [Fri, 19 Feb 2021 01:17:22 +0000 (12:17 +1100)]
Merge pull request #19579 from totten/master-aff-test
Afform - Allow public submission (PUB-CONTACT). Expand E2E test coverage.
Tim Otten [Thu, 18 Feb 2021 22:09:43 +0000 (14:09 -0800)]
mockPublicForm.test.php - Relax assertion
Note that the actual type reported varies slightly by CMS/configuration.
assertContentType() should factor-out those differences. We just need
loose claim here.
Coleman Watts [Thu, 18 Feb 2021 21:02:25 +0000 (16:02 -0500)]
SearchKit - Enable links for implicit joins
Automatically create links for any implicitly joined entity linked through an fk field
Coleman Watts [Thu, 18 Feb 2021 18:44:54 +0000 (13:44 -0500)]
Fix APIv4 unit test for 'readonly' attribute
Coleman Watts [Thu, 18 Feb 2021 15:43:47 +0000 (10:43 -0500)]
Regenerate DAOs with readonly attribute for id fields
Coleman Watts [Thu, 18 Feb 2021 15:41:28 +0000 (10:41 -0500)]
Add 'readonly' attribute to schema fields
For core fields, applies to primaryKey fields and fields tagged <readonly>.
For custom fields, this comes through via the 'is_view' property.
This will help autogenerated forms to know whether a field is appropriate to show to the user.
Coleman Watts [Thu, 18 Feb 2021 14:16:16 +0000 (09:16 -0500)]
SearchKit - Add links to view multi-record custom data
Ideally custom entities would have a full set of CRUD links, but the form code is a bizarre mess
and requires a bunch of extra url params that have to be calcultated when constructing the links.
Just getting the VIEW link was difficult because I had to remove the requirement of passing CID
& teach the form to look it up.
Coleman Watts [Thu, 18 Feb 2021 13:57:52 +0000 (08:57 -0500)]
Fix incorrect use of ts when setting custom data form title
Matthew Wire [Thu, 18 Feb 2021 10:25:54 +0000 (10:25 +0000)]
Merge pull request #19598 from eileenmcnaughton/msg_tpl_less
Convert Smarty & domain token processing to use token processor
Seamus Lee [Thu, 18 Feb 2021 10:07:47 +0000 (21:07 +1100)]
Merge pull request #19615 from totten/master-joomla-getufid
Joomla - Implement getUfId(). Fix `@user:<name>`.
Seamus Lee [Thu, 18 Feb 2021 09:29:26 +0000 (20:29 +1100)]
Merge pull request #19617 from colemanw/searchKitEditAfformLink
dev/core#2389 SearchKit - Show edit link to searchDisplay afforms
Eileen McNaughton [Wed, 17 Feb 2021 23:01:01 +0000 (12:01 +1300)]
Merge pull request #19621 from demeritcowboy/reldate
dev/core#2392 - Deprecated url parameters in contribution dashboard detail links
demeritcowboy [Tue, 16 Feb 2021 03:38:26 +0000 (22:38 -0500)]
add test for getCaseActivityQuery
Tim Otten [Wed, 17 Feb 2021 22:17:01 +0000 (14:17 -0800)]
Merge pull request #19614 from eileenmcnaughton/dispatch
Ensure dispatcher has loaded listeners
Eileen McNaughton [Wed, 17 Feb 2021 22:07:25 +0000 (11:07 +1300)]
Merge pull request #19622 from demeritcowboy/setting-description-ts
Remove empty {ts}
demeritcowboy [Wed, 17 Feb 2021 20:30:44 +0000 (15:30 -0500)]
there's no string to translate here
demeritcowboy [Wed, 17 Feb 2021 19:49:03 +0000 (14:49 -0500)]
deprecated url parameters
Eileen McNaughton [Wed, 17 Feb 2021 19:35:58 +0000 (08:35 +1300)]
Merge pull request #18299 from tunbola/email-separate-activity
dev/core#1750: Replace Tokens In Activity Content for Sent Emails
Coleman Watts [Wed, 17 Feb 2021 17:35:30 +0000 (12:35 -0500)]
SearchKit - Use entityRef widget for ID fields
Tunbola Ogunwande [Mon, 31 Aug 2020 12:34:37 +0000 (13:34 +0100)]
dev/core#1750 Create separate email per contact and maintaining the file ids for all email attachments
Coleman Watts [Wed, 17 Feb 2021 16:56:56 +0000 (11:56 -0500)]
SearchKit - permit selection of current user id for dynamic searches
Coleman Watts [Wed, 17 Feb 2021 14:21:20 +0000 (09:21 -0500)]
SearchKit - Fix display of pseudoconstant fields
Yashodha Chaku [Wed, 17 Feb 2021 13:57:20 +0000 (19:27 +0530)]
Merge pull request #19566 from eileenmcnaughton/mem_recur
Remove always-true-if
Coleman Watts [Wed, 17 Feb 2021 13:37:55 +0000 (08:37 -0500)]
SearchKit - Show edit link to searchDisplay afforms
Tim Otten [Wed, 17 Feb 2021 08:19:11 +0000 (00:19 -0800)]
Joomla - Implement getUfId(). Fix '@user:<name>'.
Overview
--------
APIv3 includes shorthand support for referencing a contact by their username, e.g.
```
cv api contact.get id=@user:admin return=display_name
```
Before
------
On Joomla, this emits an error because `getUfId($username):int` is
not implemented.
After
-----
On Joomla, this works.
Comments
--------
There is implicit E2E test-coverage in the pending work for authx.
Tim Otten [Thu, 11 Feb 2021 07:35:41 +0000 (23:35 -0800)]
Afform Admin - If "security" and "actions" are missing, indicate the defaults
Note that this matches the defaults as interpreted by FormDataModel.
Tim Otten [Thu, 11 Feb 2021 07:35:02 +0000 (23:35 -0800)]
Afform Admin - Expose options for "security" and "actions"
Tim Otten [Thu, 11 Feb 2021 02:47:52 +0000 (18:47 -0800)]
Afform - Allow `af-entity` to specify the `security` and `actions`
* `actions` indicates whether this entity can be used for creating or updating data
* `security` indicates whether it uses role-based access-control (like the standard Civi admin UI)
or form-based access-control (dependent entirely on form configuration)
Tim Otten [Thu, 11 Feb 2021 02:25:23 +0000 (18:25 -0800)]
Afform - Delegated API calls should use a security helper
Before
------
The `Prefill`, `Submit`, and `AbstractProcessor` have various calls to `civicrm_api4()`
which are meant to read/write data for a specific entity.
These calls may or may not have `checkPermissions` sprinkled in.
After
-----
Those calls to `civicrm_api4()` now go through a wrapper. For example:
```php
$formDataModel->getSecureApi4('spouse')('Contact', 'get', [...]);
```
In this call, we use the settings for the `spouse` entity to pick a security
policy. Then, we execute the `Contact.get` API within that security policy.
Tim Otten [Thu, 11 Feb 2021 01:39:06 +0000 (17:39 -0800)]
(REF) AfformSubmitEvent - Provide $afform, $formDataModel, and $apiRequest
Tim Otten [Wed, 10 Feb 2021 22:33:30 +0000 (14:33 -0800)]
Extract 2 tests from AfformRoutingTest to mockPublicForm. Make example work.
These two cases rely on setting up the same fixture. It's easier to try out/debug if
the fixture is live/available as a matter of course.
Tangentially, if you try to use this form (whether as anonymous or as admin, it doesn't -- e.g.
because it doesn't have a "Submit" button. So this updates it.
Tim Otten [Fri, 22 Jan 2021 09:16:59 +0000 (01:16 -0800)]
AfformRoutingTest - For public form, split test for creating vs editing
Seamus Lee [Fri, 5 Feb 2021 03:45:24 +0000 (19:45 -0800)]
AfformRoutingTest - Add test case for anonymous submission
Tim Otten [Wed, 10 Feb 2021 22:45:25 +0000 (14:45 -0800)]
README.md - Describe test organization
Tim Otten [Wed, 10 Feb 2021 22:22:36 +0000 (14:22 -0800)]
Add basic support for `ang/*.test.php` test suite.
The previous pattern was to put all tests in `tests/phpunit/`. They would use
fixtures in a few ways, eg
* Work with example forms from the `ang/` folder. This is useful for testing specific configurations/features
(e.g. if a form is configured with `permission` of `X`, then the form should behave accordingly).
* Dynamically create/destroy forms. This is useful for testing the API mechanism (eg ensuring the `Afform.create`
and `Afform.revert` actually do create and revert things).
The two styles are both necessary. However:
1. The first style is easer to work with -- if a form fails its test, then
you can run that form interactively. If you want to add a new test-case,
you can simply copy in a working example -- you don't need to code-up
some PHPUnit logic to build the example.
2. If you have something written in the first style, then it's easier keep
the `*.aff.html` and the PHPUnit `*.php` next to each other.
Eileen McNaughton [Wed, 17 Feb 2021 06:53:58 +0000 (19:53 +1300)]
Merge pull request #19612 from colemanw/calcFields
Afform - SearchKit support for calculated fields
Tim Otten [Wed, 17 Feb 2021 06:33:48 +0000 (22:33 -0800)]
(NFC) Tweak comment
eileen [Wed, 17 Feb 2021 06:26:46 +0000 (19:26 +1300)]
Ensure dispatcher has loaded listeners
Seamus Lee [Wed, 17 Feb 2021 06:06:36 +0000 (17:06 +1100)]
Merge pull request #19613 from eileenmcnaughton/catch
Fix on recently merged asset builder catch patch
eileen [Wed, 17 Feb 2021 04:17:09 +0000 (17:17 +1300)]
Fix on recently merged asset builder catch patch
This log line got added in review & I think not tested. Only in master
https://github.com/civicrm/civicrm-core/pull/18830
Seamus Lee [Wed, 17 Feb 2021 03:19:43 +0000 (14:19 +1100)]
Merge pull request #19611 from eileenmcnaughton/ignore
Add contactlayouteditor to gitignore
Coleman Watts [Tue, 16 Feb 2021 20:59:35 +0000 (15:59 -0500)]
Afform - SearchKit support for calculated fields
This allows the aggregated columns from a savedSearch to be used as filters on an afform with embedded search display
Eileen McNaughton [Wed, 17 Feb 2021 02:24:55 +0000 (15:24 +1300)]
Merge pull request #19585 from colemanw/searchKitApi
Search Kit - Use wrapper api to run searches
eileen [Wed, 17 Feb 2021 01:44:27 +0000 (14:44 +1300)]
Add contactlayouteditor to gitignore
This is put in the tools directory during a buildkit install but we don't want to
accidentally commit it
Seamus Lee [Tue, 16 Feb 2021 20:51:41 +0000 (07:51 +1100)]
Merge pull request #19599 from totten/master-jwt
Crypto - Add support for signing and verifying JSON Web Tokens
Coleman Watts [Tue, 16 Feb 2021 13:56:01 +0000 (08:56 -0500)]
SearchKit - normalize search display column keys
Matthew Wire [Tue, 16 Feb 2021 09:42:07 +0000 (09:42 +0000)]
Merge pull request #19571 from eileenmcnaughton/ipn
[REF] Stop passing contribution into completeOrder, id is enough
Tim Otten [Tue, 16 Feb 2021 06:45:36 +0000 (22:45 -0800)]
WordPress - If we hit a "permission denied" error, return HTTP 403
Overview
--------
On WordPress, any CiviCRM page that produces a "permission denied" sends an
HTTP status code of 200. This is incorrectly indicates that the page-request was a success.
Before
------
```
$ curl -vv 'http://wpmaster.127.0.0.1.nip.io:8001/civicrm/dashboard' 2>&1 |grep HTTP
> GET /civicrm/dashboard HTTP/1.1
< HTTP/1.1 200 OK
```
After
-----
```
$ curl -vv 'http://wpmaster.127.0.0.1.nip.io:8001/civicrm/dashboard' 2>&1 |grep HTTP
> GET /civicrm/dashboard HTTP/1.1
< HTTP/1.1 403 Forbidden
```
Eileen McNaughton [Tue, 16 Feb 2021 05:02:21 +0000 (18:02 +1300)]
Merge pull request #19604 from JMAConsulting/issue-2309
core#2309: Validate weight and weight threshold
Monish Deb [Mon, 15 Feb 2021 16:06:11 +0000 (21:36 +0530)]
core#2309: Validate weight and weight threshold
Eileen McNaughton [Tue, 16 Feb 2021 01:42:25 +0000 (14:42 +1300)]
Merge pull request #19607 from demeritcowboy/unit-assert-cases
[NFC/Unit Test] Fix passing test that should pass but also should fail
demeritcowboy [Mon, 15 Feb 2021 22:45:21 +0000 (17:45 -0500)]
compare nonexistent array keys to 0 better
Eileen McNaughton [Mon, 15 Feb 2021 21:52:39 +0000 (10:52 +1300)]
Merge pull request #19606 from civicrm/5.35
5.35
Eileen McNaughton [Mon, 15 Feb 2021 20:20:15 +0000 (09:20 +1300)]
Merge pull request #19588 from MegaphoneJon/core-2379
core#2379 - avoid validation error on saving geocodes
Seamus Lee [Mon, 15 Feb 2021 20:18:08 +0000 (07:18 +1100)]
Merge pull request #19593 from eileenmcnaughton/535
Fix Redis deprecated warning
eileen [Mon, 15 Feb 2021 20:12:20 +0000 (09:12 +1300)]
dev/translation#65 Further remove moneyValueFormat
We deprecated this a while back. It is now removed except for behind the
scenes setting & getting of the value - which can go after we do
a universe search or after a few more months
Seamus Lee [Mon, 15 Feb 2021 20:06:14 +0000 (07:06 +1100)]
Merge pull request #19595 from eileenmcnaughton/tokens
[NFC] Code cleanup - use use statements, hints
Eileen McNaughton [Mon, 15 Feb 2021 20:02:44 +0000 (09:02 +1300)]
Merge pull request #19602 from JMAConsulting/money_defaults
Use specific function when formatting money for a default
Eileen McNaughton [Mon, 15 Feb 2021 19:48:07 +0000 (08:48 +1300)]
Merge pull request #19601 from civicrm/5.35
5.35
agbud8@zabuntu [Thu, 11 Feb 2021 16:52:39 +0000 (11:52 -0500)]
core#2379 - avoid validation error on saving geocodes
Monish Deb [Mon, 15 Feb 2021 14:02:53 +0000 (19:32 +0530)]
Use specific function when formatting money for a default
Seamus Lee [Mon, 15 Feb 2021 08:06:36 +0000 (19:06 +1100)]
Merge pull request #19594 from eileenmcnaughton/535m
dev/mail#89 Fix unreleased regression where civimember is not permitted/enabled
Seamus Lee [Mon, 15 Feb 2021 07:47:36 +0000 (18:47 +1100)]
Merge pull request #19600 from totten/master-http-test
HttpTestTrait - Define helper methods for E2E tests of Civi's HTTP routes
Eileen McNaughton [Mon, 15 Feb 2021 06:08:02 +0000 (19:08 +1300)]
Merge pull request #19572 from MegaphoneJon/event-48
event#48: Fix partially paid events in a modal dialog
Eileen McNaughton [Mon, 15 Feb 2021 05:44:48 +0000 (18:44 +1300)]
Merge pull request #19596 from colemanw/getFieldsOptions
APIv4 - Add option lists to getFields html_type and data_type
Tim Otten [Mon, 15 Feb 2021 05:12:48 +0000 (21:12 -0800)]
(NFC) HttpTestTrait - Fix typo
Tim Otten [Sat, 13 Feb 2021 04:29:07 +0000 (20:29 -0800)]
HttpTestTrait - assertContentType() should a little sensitive to CMS variations
This is based on the observation the WP reported `text/plain` while D7
reported `text/plain;charset=UTF-8` -- even though the Civi output logic was
the same (specifying `text/plain`).
Tim Otten [Mon, 15 Feb 2021 04:04:57 +0000 (20:04 -0800)]
Crypto - Define CIVICRM_SIGN_KEYS as way to register signing keys
Tim Otten [Mon, 15 Feb 2021 00:34:49 +0000 (16:34 -0800)]
Crypto - Define a service for creating and verifying JSON Web tokens ('crypto.jwt')
Tim Otten [Sun, 14 Feb 2021 22:03:44 +0000 (14:03 -0800)]
composer.lock - Require firebase/php-jwt
Tim Otten [Sun, 14 Feb 2021 21:53:52 +0000 (13:53 -0800)]
composer.json - Require firebase/php-jwt (v3 - v5)
When this version range?
* It's a fairly popular package, so may be prone to conflicts. A wide range is desireable.
* The low end (v3) is 5+ years old. The high end (v5) is current latest.
* If you 'git diff' between v3=>v4=>v5, the changes are fairly incrementaly. They
add more crypto algorithms, twiddle docblocks and PHP environment compatibility,
and introduce a service we don't need (JWK). The main interfaces all look the same.
* The only notable bit was that some exceptions were recategorized, but the broad taxonomy
of exceptions still seems similar.
eileen [Sat, 6 Feb 2021 03:36:45 +0000 (16:36 +1300)]
Convert Smarty & domain token processing to use token processor
This is a subset of the changes in
https://github.com/civicrm/civicrm-core/pull/19550 that we should be able to resolve
& merge while addressing that takes longer. It still gets us the
benefit of adopting a preferred pattern
Note that some test changes exist around handling of subject -
the code now converts a new line to a space consistently. In addition
tests that rely on leakage have been altered as smarty does not leak with
this approach
Coleman Watts [Fri, 12 Feb 2021 17:33:56 +0000 (12:33 -0500)]
SearchKit - Support filters in new Run action
This uses the global 'includeWildCardInName' setting to determine whether to do a full wildcard search.
Coleman Watts [Fri, 12 Feb 2021 16:55:45 +0000 (11:55 -0500)]
SearchKit - Ensure aggregated fields are aliased
Coleman Watts [Fri, 12 Feb 2021 16:06:28 +0000 (11:06 -0500)]
APIv4 - Allow field aliases in ORDER BY clause
Coleman Watts [Fri, 12 Feb 2021 15:40:24 +0000 (10:40 -0500)]
SearchKit - Refactor searchDisplay admin components: move common functions to parent
Coleman Watts [Fri, 12 Feb 2021 14:27:55 +0000 (09:27 -0500)]
SearchKit - Add orderBy selector when configuring displays
Coleman Watts [Thu, 11 Feb 2021 20:11:10 +0000 (15:11 -0500)]
SearchKit - Refactor search displays to go through centralized api wrapper
eileen [Mon, 15 Feb 2021 00:59:27 +0000 (13:59 +1300)]
[REF] simplify parameter, use preferred strict