Skip to content

Commit

Permalink
Merge branch '4.0' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaantony92 committed Aug 3, 2023
2 parents d1f8ff1 + 572b04b commit bbffbd9
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 19 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"pimcore/admin-ui-classic-bundle": "^1.0",
"pimcore/object-merger": "^4.0",
"pimcore/pimcore": "^11.0",
"pimcore/admin-ui-classic-bundle": "^1.0",
"pimcore/search-query-parser": "^1.3",
"pimcore/personalization-bundle": "^1.0",
"symfony/asset": "^6.2",
Expand Down
8 changes: 4 additions & 4 deletions install/class_source/class_CustomerSegmentGroup_export.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": null,
"parentClass": null,
"useTraits": null,
"description": "",
"parentClass": "",
"useTraits": "",
"allowInherit": false,
"allowVariants": false,
"showVariants": false,
Expand Down Expand Up @@ -255,4 +255,4 @@
"creationDate": true
}
}
}
}
6 changes: 3 additions & 3 deletions install/class_source/class_CustomerSegment_export.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"description": null,
"description": "",
"parentClass": "\\CustomerManagementFrameworkBundle\\Model\\AbstractCustomerSegment",
"implementsInterfaces": null,
"listingParentClass": "",
"useTraits": "",
"listingUseTraits": "",
"allowInherit": false,
"allowVariants": null,
"allowVariants": false,
"showVariants": false,
"layoutDefinitions": {
"fieldtype": "panel",
Expand Down Expand Up @@ -239,4 +239,4 @@
}
},
"enableGridLocking": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"useTraits": "",
"listingUseTraits": "",
"allowInherit": true,
"allowVariants": null,
"allowVariants": false,
"showVariants": false,
"generateTypeDeclarations": true,
"layoutDefinitions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": null,
"description": "",
"parentClass": "CustomerManagementFrameworkBundle\\Model\\AbstractTermSegmentBuilderDefinition",
"useTraits": null,
"useTraits": "",
"allowInherit": false,
"allowVariants": false,
"showVariants": false,
Expand Down Expand Up @@ -164,4 +164,4 @@
"creationDate": true
}
}
}
}
6 changes: 3 additions & 3 deletions install/class_source/optional/class_Customer_export.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"description": null,
"description": "",
"parentClass": "\\CustomerManagementFrameworkBundle\\Model\\AbstractCustomer",
"implementsInterfaces": null,
"listingParentClass": "",
"useTraits": "",
"listingUseTraits": "",
"allowInherit": false,
"allowVariants": null,
"allowVariants": false,
"showVariants": false,
"layoutDefinitions": {
"fieldtype": "panel",
Expand Down Expand Up @@ -1734,4 +1734,4 @@
}
},
"enableGridLocking": false
}
}
2 changes: 1 addition & 1 deletion src/Controller/Admin/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function userManagementAction(Request $request, CsrfProtectionHandler $cs
if ($request->get('data')) {
if ($request->get('xaction') == 'update') {
$csrfProtectionHandler->checkCsrfToken($request);
$data = $this->jsonResponse($request->get('data'));
$data = $this->decodeJson($request->get('data'));

$apiKeys[$data['id']] = $data['apiKey'];
SettingsStore::set(WebserviceAuthenticator::SETTINGS_STORE_KEY, json_encode($apiKeys), 'string', WebserviceAuthenticator::SETTINGS_STORE_SCOPE);
Expand Down
6 changes: 4 additions & 2 deletions src/Listing/Filter/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
namespace CustomerManagementFrameworkBundle\Listing\Filter;

use Doctrine\DBAL\Query\QueryBuilder;
use Pimcore\Db;
use Pimcore\Model\DataObject\Listing as CoreListing;
use Pimcore\Model\DataObject\Service;
use Pimcore\Model\User;
Expand Down Expand Up @@ -82,8 +83,9 @@ protected function addPermissionFilters(QueryBuilder $queryBuilder)
$allowConditions = [];
// initialize deny conditions array
$denyConditions = [];
$pathField = Service::getVersionDependentDatabaseColumnName('path');
$keyField = Service::getVersionDependentDatabaseColumnName('key');
$db = Db::get();
$pathField = $db->quoteIdentifier(Service::getVersionDependentDatabaseColumnName('path'));
$keyField = $db->quoteIdentifier(Service::getVersionDependentDatabaseColumnName('key'));
foreach ($workspaces as $workspace) {
// if user is allowed to list content -> add to allow conditions
if ($workspace->getList()) {
Expand Down
3 changes: 2 additions & 1 deletion src/View/Formatter/DefaultViewFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use CustomerManagementFrameworkBundle\Model\CustomerSegmentInterface;
use Pimcore\Model\DataObject\ClassDefinition;
use Pimcore\Model\DataObject\ClassDefinition\Data;
use Pimcore\Security\SecurityHelper;
use Symfony\Contracts\Translation\TranslatorInterface;

class DefaultViewFormatter implements ViewFormatterInterface
Expand Down Expand Up @@ -176,7 +177,7 @@ public function getLocale()
*/
protected function formatSegmentValue(CustomerSegmentInterface $segment)
{
return sprintf('<span class="label label-default">%s</span>', $segment->getName());
return sprintf('<span class="label label-default">%s</span>', SecurityHelper::convertHtmlSpecialChars($segment->getName()));
}

protected function getLanguageFromLocale($locale)
Expand Down

0 comments on commit bbffbd9

Please sign in to comment.