Tim Otten [Tue, 27 Jun 2023 21:36:23 +0000 (14:36 -0700)]
(REF) Invert relation between login functions. Prepare to reduce loads.
Before:
* Civi\Standalone\Security::loginAuthenticatedUserRecord() calls
Civix\Authx\Standalone::loginStateless() and Civix\Authx\Standalone::loginStateful()
* The logged-in user may be loaded twice - e.g. for workflows that
hit `loginAuthenticatedUserRecord()`
After
* Civix\Authx\Standalone::loginStateless() and Civix\Authx\Standalone::loginStateful()
call Civi\Standalone\Security::loginAuthenticatedUserRecord()
* The logged-in user is still loaded twice... but it'll small fix to load only once.
Comments
* The redundancy arose because `loginAuthenticatedUserRecord()` had the full-record,
and it called to `loginStateless()` (etc) with just ID or name - which then loaded
the full-record again.
* One might ask: "Is one orientation conceptually or philosophically better
than the other?" I don't have a good answer to that, but... I think this
patch makes for a nicer symmetry between `Civi\Authx\Standalone` and
`Civi\Authx\{Drupal,WordPress,etc}`. In all cases, they take the
userID/username and then perform a 1-4 SLOC incantation that
populates the global user-record.
Tim Otten [Tue, 27 Jun 2023 08:49:36 +0000 (01:49 -0700)]
Standalone - Track logged-in user object
Overview
--------
This is a partial solution for running `E2E_Extern_CliRunnerTest::testPermissionLookup()` on Standalone.
Technical Details
-----------------
The test calls:
```
cv ev --user='admin' 'echo json_encode(CRM_Core_Config::singleton()->userPermissionClass->check("administer CiviCRM", 0));'
```
Internally, this command relies on `CRM_Core_BAO_UFMatch::synchronize()` by way of:
https://github.com/civicrm/cv/blob/
59efd9ffefde8dc500643e048d37db90e0de11b7/src/Util/BootTrait.php#L213-L235
Calls to `UFMatch::synchronize($user)` are expected to pass in a user-record.
Before
------
Standalone logins record the active user-ID.
After
------
Standalone logins record the active user-ID and active user-record (which can be supplied to `UFMatch::synchronize()`).
Eileen McNaughton [Thu, 29 Jun 2023 20:10:19 +0000 (13:10 -0700)]
Merge pull request #26680 from demeritcowboy/codegen-php8
[PHP8] Codegen - Don't generate invalid secondary emails
demeritcowboy [Thu, 29 Jun 2023 14:39:15 +0000 (10:39 -0400)]
Merge pull request #26673 from larssandergreen/Rename-dedupe-rules
Clarify dedupe rules as "Name or Email"
demeritcowboy [Thu, 29 Jun 2023 13:57:17 +0000 (09:57 -0400)]
avoid invalid secondary emails
colemanw [Thu, 29 Jun 2023 02:17:35 +0000 (19:17 -0700)]
Merge pull request #26654 from eileenmcnaughton/survey_2
Add workflow message template for sign_petition, confirm petition
colemanw [Thu, 29 Jun 2023 02:17:16 +0000 (19:17 -0700)]
Merge pull request #26655 from eileenmcnaughton/survey_3
Fix test to use created workflow
Eileen McNaughton [Wed, 28 Jun 2023 16:49:13 +0000 (09:49 -0700)]
Merge pull request #26675 from totten/master-data-cleanup
(REF) Simplify some more installation data
Eileen McNaughton [Wed, 28 Jun 2023 16:47:41 +0000 (09:47 -0700)]
Merge pull request #26678 from totten/master-joomla-setup
(dev/core#1615) Setup - Prepare to generate Joomla-style "civicrm.settings.php"
Eileen McNaughton [Wed, 28 Jun 2023 16:46:52 +0000 (09:46 -0700)]
Merge pull request #26677 from totten/master-dist
distmaker - Add some options to speed up frequent rebuilds
Eileen McNaughton [Wed, 28 Jun 2023 16:45:11 +0000 (09:45 -0700)]
Merge pull request #24681 from larssandergreen/force-refresh-cache-for-smart-groups-when-scheduling-mailing
dev/core#3890 Rebuild smart groups included in mailing on scheduling
Eileen McNaughton [Wed, 28 Jun 2023 16:34:13 +0000 (09:34 -0700)]
Merge pull request #26679 from artfulrobot/tidy-ufId-to-ufID
NFC: standardise ufId to ufID to avoid confusion
Rich Lott / Artful Robot [Wed, 28 Jun 2023 13:55:36 +0000 (14:55 +0100)]
NFC: standardise ufId to ufID to avoid confusion
Tim Otten [Wed, 28 Jun 2023 08:41:01 +0000 (01:41 -0700)]
InstallSettingsFile - Split out separate rules for Joomla settings files
Tim Otten [Wed, 28 Jun 2023 08:11:44 +0000 (01:11 -0700)]
SettingsUtil::evaluate - Substitute variables atomically
Iterative substitution allows silliness. It's not a specific problem because
the range of inputs is so narrow here, but it's good cleanup the code-smell.
Tim Otten [Wed, 28 Jun 2023 08:00:21 +0000 (01:00 -0700)]
(REF) InstallSettingsFile - Extract 'createParams()` and `evaluate()`
Tim Otten [Wed, 28 Jun 2023 06:37:01 +0000 (23:37 -0700)]
distmaker - Add option DM_SKIP_EXT
Tim Otten [Wed, 28 Jun 2023 06:28:12 +0000 (23:28 -0700)]
distmaker - Don't print every statement (Joomla build script)
Tim Otten [Wed, 28 Jun 2023 06:27:50 +0000 (23:27 -0700)]
distmaker - Use quieter "rsync"
Tim Otten [Wed, 28 Jun 2023 05:57:12 +0000 (22:57 -0700)]
distmaker - Add options DM_KEEP_GIT, DM_KEEP_DEPS, DM_SKIP_ALT
If you're going through a frequent build/test cycle on Joomla patches, it's nice to cutdown
unnecessary build steps.
Tim Otten [Wed, 28 Jun 2023 00:00:31 +0000 (17:00 -0700)]
(REF) Simplify civicrm_tag.sqldata.php
Tim Otten [Wed, 28 Jun 2023 00:00:24 +0000 (17:00 -0700)]
(REF) Simplify civicrm_membership_status.sqldata.php
Tim Otten [Wed, 28 Jun 2023 00:00:18 +0000 (17:00 -0700)]
(REF) Simplify civicrm_location_type.sqldata.php
Tim Otten [Tue, 27 Jun 2023 23:59:43 +0000 (16:59 -0700)]
(REF) Simplify civicrm_job.sqldata.php
Tim Otten [Tue, 27 Jun 2023 23:59:20 +0000 (16:59 -0700)]
(REF) Simplify civicrm_contact_type.sqldata.php
Tim Otten [Tue, 27 Jun 2023 21:09:41 +0000 (14:09 -0700)]
Merge pull request #26657 from totten/master-standalone-403
Standalone - Generate proper HTTP response code for permission-errors
larssandergreen [Tue, 27 Jun 2023 21:01:37 +0000 (21:01 +0000)]
regenerate civicrm_generated
larssandergreen [Tue, 27 Jun 2023 20:55:53 +0000 (14:55 -0600)]
Rename "Name and Email" dedupe rules to "Name or Email"
demeritcowboy [Tue, 27 Jun 2023 20:53:06 +0000 (16:53 -0400)]
Merge pull request #26604 from christianwach/lab-wp-121
Fix UTC offsets when retrieving timezone string in WordPress
Yashodha Chaku [Tue, 27 Jun 2023 11:31:54 +0000 (17:01 +0530)]
Merge pull request #26671 from colemanw/deleteTpl
Delete unused tpl file
colemanw [Tue, 27 Jun 2023 04:57:52 +0000 (00:57 -0400)]
Delete unused tpl file
This tpl is unused since
b30809e49e9ed5142092f2157877a24ad1df17ee
Eileen McNaughton [Tue, 27 Jun 2023 00:06:38 +0000 (17:06 -0700)]
Merge pull request #26383 from MegaphoneJon/crmmoney-filter
crmMoney filter - allow coercing locale
Eileen McNaughton [Tue, 27 Jun 2023 00:00:09 +0000 (17:00 -0700)]
Merge pull request #25989 from eileenmcnaughton/import_county
Ensure counties are properly imported even if ambiguous
Jamie McClelland [Mon, 5 Dec 2022 21:49:21 +0000 (16:49 -0500)]
ensure counties are properly imported even if ambiguous
If a county has a unique name, you can import it by name.
But, if there is one or more counties with the same name, the county is
not properly converted to an id, and we get a foreign constraint error
and/or a invalid value error.
Tim Otten [Mon, 26 Jun 2023 22:22:28 +0000 (15:22 -0700)]
Merge pull request #26651 from eileenmcnaughton/workflow
Follow up to #26618 - set locale consistently when exporting model
Tim Otten [Sun, 25 Jun 2023 08:13:57 +0000 (01:13 -0700)]
Standalone - Generate proper HTTP response code for permission-errors
`E2E_Core_ErrorTest` checks for HTTP response codes on permission-errors
* Before: Sends HTTP 200. Tests for `frontend_permission` and `backend_permission` fails.
* After: Sends HTTP 403. Tests for `frontend_permission` and `backend_permission` passes.
Tim Otten [Mon, 26 Jun 2023 20:01:07 +0000 (13:01 -0700)]
Merge pull request #26649 from totten/master-standalone-paths
Standalone - Fix some path calculations
Tim Otten [Mon, 26 Jun 2023 19:34:46 +0000 (12:34 -0700)]
Merge pull request #26643 from totten/master-auto-enable
Standalone - Auto-enable user subsystem. Tweak default user.
demeritcowboy [Mon, 26 Jun 2023 18:37:45 +0000 (14:37 -0400)]
Merge pull request #26670 from larssandergreen/Remove-Search-Builder-links-from-search-results
Remove Search Builder link from search results
Tim Otten [Mon, 26 Jun 2023 18:34:41 +0000 (11:34 -0700)]
StandaloneUsers.civi-setup.php - Fix log message for recently added 'adminUser' property
larssandergreen [Mon, 26 Jun 2023 18:01:15 +0000 (12:01 -0600)]
Remove Search Builder link from search results
Seamus Lee [Mon, 26 Jun 2023 15:27:02 +0000 (11:27 -0400)]
Merge pull request #26667 from civicrm/5.63
5.63
Seamus Lee [Mon, 26 Jun 2023 15:26:40 +0000 (11:26 -0400)]
Merge pull request #26668 from demeritcowboy/adminui-reserved
Admin UI - be like regular civi and don't show reserved custom groups
demeritcowboy [Mon, 26 Jun 2023 14:00:41 +0000 (10:00 -0400)]
Merge pull request #26665 from eileenmcnaughton/import
dev/core#4317 Fix import issue when civicrm_custom_group.name ends in `_`
colemanw [Mon, 26 Jun 2023 13:42:13 +0000 (06:42 -0700)]
Merge pull request #26661 from eileenmcnaughton/tokens
Add survey tokens
colemanw [Mon, 26 Jun 2023 13:37:03 +0000 (06:37 -0700)]
Merge pull request #26664 from eileenmcnaughton/custom_search
Move last (hopefully) custom search classes to the extension, unhide
demeritcowboy [Mon, 26 Jun 2023 13:29:45 +0000 (09:29 -0400)]
Merge pull request #26666 from totten/5.63-datadist
dev/core#4392 - Distribute `sql/civicrm_data/` with tarball
colemanw [Mon, 26 Jun 2023 13:29:31 +0000 (06:29 -0700)]
Merge pull request #26642 from jitendrapurohit/sk_rel_actions
Fix actions on Relationship search using Searchkit
Aidan Saunders [Mon, 26 Jun 2023 11:53:53 +0000 (12:53 +0100)]
Merge pull request #26663 from colemanw/searchKitActionLinks
SearchKit - Reuse helpers from CRM_Core_Action
Tim Otten [Mon, 26 Jun 2023 07:21:59 +0000 (00:21 -0700)]
Merge pull request #26662 from eileenmcnaughton/token_default
Add capitalize filter to tokens
Eileen McNaughton [Mon, 26 Jun 2023 06:57:21 +0000 (23:57 -0700)]
dev/core#4317 Fix import issue when civicrm_custom_group.name ends in _
Tim Otten [Mon, 26 Jun 2023 06:42:18 +0000 (23:42 -0700)]
dev/core#4392 - Distribute civicrm_data files
jitendrapurohit [Sat, 24 Jun 2023 05:22:36 +0000 (10:52 +0530)]
Fix actions on Relationship search using Searchkit
Eileen McNaughton [Mon, 26 Jun 2023 04:58:37 +0000 (21:58 -0700)]
Move last (hopefully) custom search classes to the extension, unhide
colemanw [Mon, 26 Jun 2023 02:59:27 +0000 (22:59 -0400)]
SearchKit - Reuse helpers from CRM_Core_Action
This simplifies SearchKit code by reusing the new helpers added in
cf957fc
It adds an additional helper for fetching the icon associated with an action.
Also fixes an action name in the CustomField DAO which did not match the name
of a CRM_Core_Action (renamed 'move' to 'detach' which is the convention other entities use).
demeritcowboy [Sun, 25 Jun 2023 23:45:57 +0000 (19:45 -0400)]
don't show reserved groups
Eileen McNaughton [Sun, 25 Jun 2023 21:46:27 +0000 (14:46 -0700)]
Add capitalize filter to tokens
colemanw [Sun, 25 Jun 2023 21:41:07 +0000 (14:41 -0700)]
Merge pull request #26660 from eileenmcnaughton/custom_group
Move Custom Group search test to extension, remove xml brittleness
Tim Otten [Sun, 25 Jun 2023 20:41:29 +0000 (13:41 -0700)]
(NFC) Comment to explain use-case for $requestedLocale
Eileen McNaughton [Sun, 25 Jun 2023 00:36:11 +0000 (17:36 -0700)]
Follow up to #26618 - set locale consistently when exporting model
Eileen McNaughton [Sun, 25 Jun 2023 19:41:35 +0000 (12:41 -0700)]
Add survey tokens
Eileen McNaughton [Sun, 25 Jun 2023 19:38:59 +0000 (12:38 -0700)]
Merge pull request #26658 from colemanw/autoLinks2
[REF] Switch a bunch of core pages to use auto-links
Eileen McNaughton [Sun, 25 Jun 2023 17:06:55 +0000 (10:06 -0700)]
Move Custom Group search test to extension, remove xml brittleness
Tim Otten [Sun, 25 Jun 2023 18:35:37 +0000 (11:35 -0700)]
Merge pull request #26656 from totten/master-standalone-dbg
Standalone - Suppress debug output
colemanw [Sun, 25 Jun 2023 15:59:11 +0000 (08:59 -0700)]
Merge pull request #26652 from eileenmcnaughton/pet
Remove copy-and-paste comment
colemanw [Sun, 25 Jun 2023 15:58:39 +0000 (08:58 -0700)]
Merge pull request #26653 from eileenmcnaughton/survey
Add apiv4 Survey entity
colemanw [Sun, 25 Jun 2023 04:39:11 +0000 (00:39 -0400)]
Switch to autoLinks for MailingComponent page
colemanw [Sun, 25 Jun 2023 01:53:18 +0000 (20:53 -0500)]
Switch to autoLinks for MailSettings page
colemanw [Sun, 25 Jun 2023 01:48:45 +0000 (20:48 -0500)]
Switch to autoLinks for MembershipStatus page
colemanw [Sun, 25 Jun 2023 01:36:40 +0000 (20:36 -0500)]
Switch to autoLinks for PaymentProcessor page
colemanw [Sun, 25 Jun 2023 01:32:15 +0000 (20:32 -0500)]
Switch to autoLinks for ParticipantStatusType page
colemanw [Sun, 25 Jun 2023 01:25:59 +0000 (20:25 -0500)]
Switch to autoLinks for RelationshipType page
colemanw [Sun, 25 Jun 2023 01:20:30 +0000 (20:20 -0500)]
Switch to autoLinks for PaymentProcessorType page
colemanw [Sun, 25 Jun 2023 00:52:48 +0000 (19:52 -0500)]
Switch to autoLinks for DatePreferences page
colemanw [Sun, 25 Jun 2023 00:51:33 +0000 (19:51 -0500)]
Switch to autoLinks for contactType and locationType
colemanw [Sun, 25 Jun 2023 00:30:47 +0000 (19:30 -0500)]
Switch to autoLinks for SMSProvider page
colemanw [Sun, 25 Jun 2023 00:14:19 +0000 (19:14 -0500)]
CRM_Core_Page_Basic - Cleanup copy-pasta comments
colemanw [Sat, 24 Jun 2023 23:51:48 +0000 (18:51 -0500)]
Switch to autoLinks for ACLEntityRole page
Tim Otten [Sat, 24 Jun 2023 23:38:37 +0000 (16:38 -0700)]
Standalone - Suppress debug output
Eileen McNaughton [Sun, 25 Jun 2023 06:03:59 +0000 (23:03 -0700)]
Merge pull request #26644 from colemanw/autoLinks
REF - Auto-generate links for CRM_Core_Page_Basic
Eileen McNaughton [Sun, 25 Jun 2023 05:59:07 +0000 (22:59 -0700)]
Fix test to use created workflow
Currently it uses a 'real' workflow & if we change the workflow the test breaks
- which is not what the test is testing. The test checks loading & rendering from
the database, not a specific workflow. This fixes to create a template
for the test, rather than using a real one
Eileen McNaughton [Sun, 25 Jun 2023 05:40:53 +0000 (22:40 -0700)]
Add workflow message template for sign_petition
This should make tokens available
(once added per https://github.com/civicrm/civicrm-core/pull/26650
but no actual runtime change as yet
Eileen McNaughton [Sun, 25 Jun 2023 05:37:38 +0000 (22:37 -0700)]
Add apiv4 Survey entity
Eileen McNaughton [Sun, 25 Jun 2023 05:36:21 +0000 (22:36 -0700)]
Remove copy-and-paste comment
colemanw [Sat, 24 Jun 2023 15:46:42 +0000 (08:46 -0700)]
REF - Auto-generate links for CRM_Core_Page_Basic
Instead of hard-coding an array of links in every page, we can auto-generate the list
based on the 'paths' metadata in the DAO. As a POC this converts one page (ACLs).
Future conversions are simply a matter of ensuring 'paths' is defined then deleting the
links function and $_links variable.
Tim Otten [Sat, 24 Jun 2023 23:34:14 +0000 (16:34 -0700)]
Standalone - Fix generation of absolute URLs
Tim Otten [Sat, 24 Jun 2023 23:23:03 +0000 (16:23 -0700)]
Standalone bootstrap - Guard against variations in trailing /
Seamus Lee [Sat, 24 Jun 2023 23:54:06 +0000 (19:54 -0400)]
Merge pull request #26640 from eileenmcnaughton/processor_clean
[Test] Clean up payment processors when cleaning up other related entities
Tim Otten [Sat, 24 Jun 2023 22:49:17 +0000 (15:49 -0700)]
standaloneusers - Convert SecurityTest from headless to e2e
Tim Otten [Sat, 24 Jun 2023 22:48:51 +0000 (15:48 -0700)]
standaloneusers - Slightly relax install check to allow headless.
Tim Otten [Sat, 24 Jun 2023 22:45:58 +0000 (15:45 -0700)]
(NFC) SecurityTest - Apply the changes that PHPStorm yearns for
Eileen McNaughton [Sat, 24 Jun 2023 22:21:24 +0000 (15:21 -0700)]
Merge pull request #26648 from eileenmcnaughton/ufmatch
Fix test to not use brittle xml, remove redundant crud tests
Eileen McNaughton [Sat, 24 Jun 2023 21:16:02 +0000 (14:16 -0700)]
Fix test to not use brittle xml, remove redundant crud tests
Eileen McNaughton [Sat, 24 Jun 2023 21:03:34 +0000 (14:03 -0700)]
Merge pull request #26647 from colemanw/mappingCleanup
REF - Code cleanup and notice fixes in scheduled reminders
colemanw [Sat, 24 Jun 2023 19:49:35 +0000 (12:49 -0700)]
Merge pull request #26645 from eileenmcnaughton/ufjoin
Update UFJoin test to not use brittle xml set up
colemanw [Sat, 24 Jun 2023 19:18:45 +0000 (12:18 -0700)]
REF - Code cleanup and notice fixes in scheduled reminders
Eileen McNaughton [Sat, 24 Jun 2023 17:42:40 +0000 (10:42 -0700)]
Merge pull request #26634 from eileenmcnaughton/civi_unit
Fix some test cleanup routines
Eileen McNaughton [Sat, 24 Jun 2023 17:07:09 +0000 (10:07 -0700)]
Update UFJoin test to not use brittle xml set up
This also removes a bunch of tests that are redundant due to
the various other levels of api & entity testing & does other
minor cleanup like fixing expected & actual variables to be in the right order
A cause of test fails for
https://github.com/civicrm/civicrm-core/pull/26546
Eileen McNaughton [Fri, 23 Jun 2023 23:43:02 +0000 (16:43 -0700)]
Fix some test cleanup routines
colemanw [Sat, 24 Jun 2023 16:04:52 +0000 (09:04 -0700)]
Merge pull request #26638 from eileenmcnaughton/uf
Cleanup Apiv3-UfField test