APIv4 - Expand Group.create permissions to include CiviMail
authorColeman Watts <coleman@civicrm.org>
Mon, 15 Aug 2022 21:15:01 +0000 (17:15 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 17 Aug 2022 18:59:28 +0000 (14:59 -0400)
commit781b0f89de4ec7d7fa9a03c5592fdfada9d4aee1
treefc288530702b2f4aedb159fd401fce0d7c5d62f0
parent07ab3d1c986dc6d5a0e082a8a1d8133dffbd0faf
APIv4 - Expand Group.create permissions to include CiviMail
Fixes dev/core#3755

Before: Creating a new group required 'edit groups' permission.
After: When creating a 'Mailing List' group, either 'edit groups' OR 'access CiviMail' OR 'create mailings' will work.

This allows users without 'edit groups' permission to still create a mailing from SearchKit.
CRM/Contact/BAO/Group.php
Civi/Api4/Group.php
tests/phpunit/api/v4/Entity/GroupTest.php [new file with mode: 0644]