From 781b113c867ef8e1da7a50031e849c4934de6c1d Mon Sep 17 00:00:00 2001 From: Thorsten Reiter Date: Sat, 29 Jun 2024 10:54:49 +0200 Subject: [PATCH] minor change --- .idea/.gitignore | 8 + .idea/core.iml | 35 ++++ .idea/deployment.xml | 63 ++++++ .idea/inspectionProfiles/Project_Default.xml | 6 + .idea/misc.xml | 7 + .idea/modules.xml | 8 + .idea/php-test-framework.xml | 14 ++ .idea/php.xml | 191 ++++++++++++++++++ .idea/phpunit.xml | 13 ++ .idea/symfony2.xml | 6 + .idea/vcs.xml | 6 + .../ContentService/UpdateContentTest.php | 22 +- 12 files changed, 365 insertions(+), 14 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/core.iml create mode 100644 .idea/deployment.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php-test-framework.xml create mode 100644 .idea/php.xml create mode 100644 .idea/phpunit.xml create mode 100644 .idea/symfony2.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..1c2fda565b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/core.iml b/.idea/core.iml new file mode 100644 index 0000000000..b3668dcc98 --- /dev/null +++ b/.idea/core.iml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 0000000000..7b1da11c48 --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..576d84cdb9 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..7853289294 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..23d91e88f1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml new file mode 100644 index 0000000000..d3adbc9975 --- /dev/null +++ b/.idea/php-test-framework.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000000..1ebd4e3cca --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml new file mode 100644 index 0000000000..c29ba63b19 --- /dev/null +++ b/.idea/phpunit.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/symfony2.xml b/.idea/symfony2.xml new file mode 100644 index 0000000000..2dfac5e59e --- /dev/null +++ b/.idea/symfony2.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..c8397c94c0 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/tests/integration/Core/Repository/ContentService/UpdateContentTest.php b/tests/integration/Core/Repository/ContentService/UpdateContentTest.php index ddb72de375..b865a3e09d 100644 --- a/tests/integration/Core/Repository/ContentService/UpdateContentTest.php +++ b/tests/integration/Core/Repository/ContentService/UpdateContentTest.php @@ -31,22 +31,16 @@ public function testUpdateContentHavingPrivateRelation(): void $sectionService = $repository->getSectionService(); $contentService = $repository->getContentService(); $userService = $repository->getUserService(); + $roleService = $repository->getRoleService(); $permissionResolver = $repository->getPermissionResolver(); - /* BEGIN: Use Case */ // 1. Add relation field to 'folder' ContentType $folderType = $contentTypeService->loadContentTypeByIdentifier('folder'); $folderTypeDraft = $contentTypeService->createContentTypeDraft($folderType); - $titleFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('relations', 'ezobjectrelationlist'); - $titleFieldCreateStruct->names = ['eng-GB' => 'Relations']; - $titleFieldCreateStruct->descriptions = ['eng-GB' => 'Relations']; - $titleFieldCreateStruct->fieldGroup = 'content'; - $titleFieldCreateStruct->position = 10; - $titleFieldCreateStruct->isTranslatable = false; - $titleFieldCreateStruct->isRequired = false; - $titleFieldCreateStruct->isSearchable = false; - $contentTypeService->addFieldDefinition($folderTypeDraft, $titleFieldCreateStruct); + $relationsFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('relations', 'ezobjectrelationlist'); + $relationsFieldCreateStruct->names = ['eng-GB' => 'Relations']; + $contentTypeService->addFieldDefinition($folderTypeDraft, $relationsFieldCreateStruct); $contentTypeService->publishContentTypeDraft($folderTypeDraft); // 2. Add Section 'private' @@ -69,15 +63,15 @@ public function testUpdateContentHavingPrivateRelation(): void $contentService->publishVersion($folder->getVersionInfo()); // 5. Create User that has no access to content in $privateSection - $editorRole = $repository->getRoleService()->loadRole(3); + $editorRole = $roleService->loadRole(3); // remove existing role assignments - foreach ($repository->getRoleService()->getRoleAssignments($editorRole) as $role) { - $repository->getRoleService()->removeRoleAssignment($role); + foreach ($roleService->getRoleAssignments($editorRole) as $role) { + $roleService->removeRoleAssignment($role); } $editorUserGroup = $userService->loadUserGroup(13); // grant access to standard section - $repository->getRoleService()->assignRoleToUserGroup( + $roleService->assignRoleToUserGroup( $editorRole, $editorUserGroup, new SectionLimitation(['limitationValues' => [1]])