Skip to content

Commit fbd9968

Browse files
committed
Merge branch '4.0' into 4.x
2 parents 6ccff3a + df5007a commit fbd9968

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"drewm/mailchimp-api": "^2.2",
2222
"guzzlehttp/guzzle": "^7.2",
2323
"knplabs/knp-components": "^4.0",
24-
"pear/archive_tar": "^1.4.3",
24+
"pear/archive_tar": "^1.4.14",
2525
"pimcore/newsletter-bundle": "^1.0",
2626
"pimcore/number-sequence-generator": "^2.0",
2727
"pimcore/admin-ui-classic-bundle": "^1.0",

doc/26_Webservice.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ The customers API implements standard REST calls for customer CRUD actions:
2424
| Path | Method | Description |
2525
|----------------------------------------------------------|--------|-----------------------------|
2626
| /__customermanagementframework/webservice/customers | GET | Fetch all customers |
27-
| /__customermanagementframework/webservice/customers/{id} | GET | Fetch a single customer |
27+
| /__customermanagementframework/webservice/customers/\{id\} | GET | Fetch a single customer |
2828
| /__customermanagementframework/webservice/customers | POST | Create a new customer |
29-
| /__customermanagementframework/webservice/customers/{id} | PATCH | Partially update a customer |
30-
| /__customermanagementframework/webservice/customers/{id} | DELETE | Delete a customer |
29+
| /__customermanagementframework/webservice/customers/\{id\} | PATCH | Partially update a customer |
30+
| /__customermanagementframework/webservice/customers/\{id\} | DELETE | Delete a customer |
3131

3232
The `GET` requests can be filtered by passing the following params as query params:
3333

@@ -47,10 +47,10 @@ The activities API implements standard REST calls for activity CRUD actions:
4747
| Path | Method | Description |
4848
|-----------------------------------------------------------|--------|-------------------------------|
4949
| /__customermanagementframework/webservice/activities | GET | Fetch all activities |
50-
| /__customermanagementframework/webservice/activities/{id} | GET | Fetch a single activity |
50+
| /__customermanagementframework/webservice/activities/\{id\} | GET | Fetch a single activity |
5151
| /__customermanagementframework/webservice/activities | POST | Create a new activity |
52-
| /__customermanagementframework/webservice/activities/{id} | PATCH | Partially update a activity |
53-
| /__customermanagementframework/webservice/activities/{id} | DELETE | Delete a activity |
52+
| /__customermanagementframework/webservice/activities/\{id\} | PATCH | Partially update a activity |
53+
| /__customermanagementframework/webservice/activities/\{id\} | DELETE | Delete a activity |
5454

5555
The `GET` requests can be filtered by passing the following params as query params:
5656

@@ -84,10 +84,10 @@ The segments API implements standard REST calls for customer segment CRUD action
8484
| Path | Method | Description |
8585
|-----------------------------------------------------------|--------|-------------------------------|
8686
| /__customermanagementframework/webservice/segments | GET | Fetch all segments |
87-
| /__customermanagementframework/webservice/segments/{id} | GET | Fetch a single segment |
87+
| /__customermanagementframework/webservice/segments/\{id\} | GET | Fetch a single segment |
8888
| /__customermanagementframework/webservice/segments | POST | Create a new segment |
89-
| /__customermanagementframework/webservice/segments/{id} | PATCH | Partially update a segment |
90-
| /__customermanagementframework/webservice/segments/{id} | DELETE | Delete a segment |
89+
| /__customermanagementframework/webservice/segments/\{id\} | PATCH | Partially update a segment |
90+
| /__customermanagementframework/webservice/segments/\{id\} | DELETE | Delete a segment |
9191

9292
The `GET` requests can be filtered by passing the follwing params as query params:
9393

@@ -103,10 +103,10 @@ The segment groups API implements standard REST calls for customer segment group
103103
| Path | Method | Description |
104104
|-----------------------------------------------------------------|--------|---------------------------------------|
105105
| /__customermanagementframework/webservice/segment-groups | GET | Fetch all segment groups |
106-
| /__customermanagementframework/webservice/segment-groups/{id} | GET | Fetch a single segment group |
106+
| /__customermanagementframework/webservice/segment-groups/\{id\} | GET | Fetch a single segment group |
107107
| /__customermanagementframework/webservice/segment-groups | POST | Create a new segment group |
108-
| /__customermanagementframework/webservice/segment-groups/{id} | PATCH | Partially update a segment group |
109-
| /__customermanagementframework/webservice/segment-groups/{id} | DELETE | Delete a segment group |
108+
| /__customermanagementframework/webservice/segment-groups/\{id\} | PATCH | Partially update a segment group |
109+
| /__customermanagementframework/webservice/segment-groups/\{id\} | DELETE | Delete a segment group |
110110

111111
The `GET` requests can be filtered by passing the following params as query params:
112112

src/Controller/Admin/DuplicatesController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Symfony\Component\HttpFoundation\JsonResponse;
2424
use Symfony\Component\HttpFoundation\Request;
2525
use Symfony\Component\HttpFoundation\Response;
26+
use Symfony\Component\HttpKernel\Event\ControllerEvent;
2627
use Symfony\Component\Routing\Annotation\Route;
2728

2829
/**
@@ -35,6 +36,12 @@ public function init()
3536
AbstractObject::setHideUnpublished(true);
3637
}
3738

39+
public function onKernelControllerEvent(ControllerEvent $event): void
40+
{
41+
parent::onKernelControllerEvent($event);
42+
$this->checkPermission('plugin_cmf_perm_customerview');
43+
}
44+
3845
/**
3946
* @Route("/list")
4047
*

src/Controller/Admin/GDPRDataController.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,29 @@
1616
namespace CustomerManagementFrameworkBundle\Controller\Admin;
1717

1818
use CustomerManagementFrameworkBundle\GDPR\DataProvider\Customers;
19+
use Pimcore\Controller\KernelControllerEventInterface;
1920
use Pimcore\Controller\Traits\JsonHelperTrait;
2021
use Pimcore\Controller\UserAwareController;
2122
use Pimcore\Model\DataObject\AbstractObject;
2223
use Symfony\Component\HttpFoundation\JsonResponse;
2324
use Symfony\Component\HttpFoundation\Request;
25+
use Symfony\Component\HttpKernel\Event\ControllerEvent;
2426
use Symfony\Component\Routing\Annotation\Route;
2527

2628
/**
2729
* Class DataObjectController
2830
*
2931
* @Route("/gdpr-data")
3032
*/
31-
class GDPRDataController extends UserAwareController
33+
class GDPRDataController extends UserAwareController implements KernelControllerEventInterface
3234
{
3335
use JsonHelperTrait;
3436

37+
public function onKernelControllerEvent(ControllerEvent $event): void
38+
{
39+
$this->checkPermission('gdpr_data_extractor');
40+
}
41+
3542
/**
3643
* @Route("/search-data-objects", name="_pimcore_customermanagementframework_gdprdata_searchdataobjects", methods={"GET"})
3744
*/

src/CustomerSaveManager/DefaultCustomerSaveManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ protected function rememberOriginalCustomer(CustomerInterface $customer)
118118
}
119119
}
120120

121-
if (!$originalCustomerNeeded && $this->getSaveOptions()->isNewsletterQueueEnabled()) {
121+
if (!$originalCustomerNeeded && $this->getSaveOptions()->isNewsletterQueueEnabled() && $customer->getId() != null) {
122122
$originalCustomerNeeded = true;
123123
}
124124

0 commit comments

Comments
 (0)