From f6e24e39ed49849a57359701704912bdff42fc0e Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Fri, 22 Oct 2021 17:52:42 +0200 Subject: [PATCH 1/7] IBX-1310: Created slots for assigning/unassigning user to groups --- eZ/Publish/Core/Repository/UserService.php | 12 +++------ .../Common/Slot/AssignUserToUserGroup.php | 24 ++++++++++++++++++ .../Common/Slot/UnAssignUserFromUserGroup.php | 25 +++++++++++++++++++ .../AssignUserToUserGroupSignal.php | 7 ++++++ .../UnAssignUserFromUserGroupSignal.php | 7 ++++++ eZ/Publish/Core/SignalSlot/UserService.php | 8 ++---- 6 files changed, 69 insertions(+), 14 deletions(-) create mode 100644 eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php create mode 100644 eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php diff --git a/eZ/Publish/Core/Repository/UserService.php b/eZ/Publish/Core/Repository/UserService.php index 06b355df988..e591d84e47a 100644 --- a/eZ/Publish/Core/Repository/UserService.php +++ b/eZ/Publish/Core/Repository/UserService.php @@ -971,9 +971,6 @@ public function expireUserToken($hash) /** * Assigns a new user group to the user. * - * @param \eZ\Publish\API\Repository\Values\User\User $user - * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup - * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to assign the user group to the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is already in the given user group */ @@ -1004,11 +1001,13 @@ public function assignUserToUserGroup(APIUser $user, APIUserGroup $userGroup) $this->repository->beginTransaction(); try { - $locationService->createLocation( + $location = $locationService->createLocation( $loadedUser->getVersionInfo()->getContentInfo(), $locationCreateStruct ); $this->repository->commit(); + + return $location->id; } catch (Exception $e) { $this->repository->rollback(); throw $e; @@ -1018,9 +1017,6 @@ public function assignUserToUserGroup(APIUser $user, APIUserGroup $userGroup) /** * Removes a user group from the user. * - * @param \eZ\Publish\API\Repository\Values\User\User $user - * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup - * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to remove the user group from the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is not in the given user group * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException If $userGroup is the last assigned user group @@ -1052,7 +1048,7 @@ public function unAssignUserFromUserGroup(APIUser $user, APIUserGroup $userGroup $locationService->deleteLocation($userLocation); $this->repository->commit(); - return; + return $userLocation->id; } catch (Exception $e) { $this->repository->rollback(); throw $e; diff --git a/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php new file mode 100644 index 00000000000..a65a5e44135 --- /dev/null +++ b/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php @@ -0,0 +1,24 @@ +indexSubtree($signal->affectedLocationId); + } +} diff --git a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php new file mode 100644 index 00000000000..c59d74210fc --- /dev/null +++ b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php @@ -0,0 +1,25 @@ +searchHandler->deleteLocation($signal->affectedLocationId, $signal->userId); + } +} diff --git a/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php b/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php index aba6ae08da3..c51017c13f6 100644 --- a/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php +++ b/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php @@ -26,4 +26,11 @@ class AssignUserToUserGroupSignal extends Signal * @var mixed */ public $userGroupId; + + /** + * AffectedLocationId. + * + * @var mixed + */ + public $affectedLocationId; } diff --git a/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php b/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php index 159e9009af1..ca9b9e4e12a 100644 --- a/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php +++ b/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php @@ -26,4 +26,11 @@ class UnAssignUserFromUserGroupSignal extends Signal * @var mixed */ public $userGroupId; + + /** + * AffectedLocationId. + * + * @var mixed + */ + public $affectedLocationId; } diff --git a/eZ/Publish/Core/SignalSlot/UserService.php b/eZ/Publish/Core/SignalSlot/UserService.php index 6892060a71f..02594ac4720 100644 --- a/eZ/Publish/Core/SignalSlot/UserService.php +++ b/eZ/Publish/Core/SignalSlot/UserService.php @@ -426,9 +426,6 @@ public function expireUserToken($hash) /** * Assigns a new user group to the user. * - * @param \eZ\Publish\API\Repository\Values\User\User $user - * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup - * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to assign the user group to the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is already in the given user group */ @@ -440,6 +437,7 @@ public function assignUserToUserGroup(User $user, UserGroup $userGroup) [ 'userId' => $user->id, 'userGroupId' => $userGroup->id, + 'affectedLocationId' => $returnValue, ] ) ); @@ -450,9 +448,6 @@ public function assignUserToUserGroup(User $user, UserGroup $userGroup) /** * Removes a user group from the user. * - * @param \eZ\Publish\API\Repository\Values\User\User $user - * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup - * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to remove the user group from the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is not in the given user group */ @@ -464,6 +459,7 @@ public function unAssignUserFromUserGroup(User $user, UserGroup $userGroup) [ 'userId' => $user->id, 'userGroupId' => $userGroup->id, + 'affectedLocationId' => $returnValue, ] ) ); From 105d3395f4b17388978f75a42ff6eb1a65258654 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Fri, 22 Oct 2021 18:59:20 +0200 Subject: [PATCH 2/7] IBX-1310: CS --- eZ/Publish/Core/Repository/UserService.php | 2 +- .../Core/Search/Common/Slot/UnAssignUserFromUserGroup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eZ/Publish/Core/Repository/UserService.php b/eZ/Publish/Core/Repository/UserService.php index e591d84e47a..a7dcf1c523b 100644 --- a/eZ/Publish/Core/Repository/UserService.php +++ b/eZ/Publish/Core/Repository/UserService.php @@ -1001,7 +1001,7 @@ public function assignUserToUserGroup(APIUser $user, APIUserGroup $userGroup) $this->repository->beginTransaction(); try { - $location = $locationService->createLocation( + $location = $locationService->createLocation( $loadedUser->getVersionInfo()->getContentInfo(), $locationCreateStruct ); diff --git a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php index c59d74210fc..12e5a72320e 100644 --- a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php +++ b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php @@ -14,7 +14,7 @@ */ class UnAssignUserFromUserGroup extends Slot { - public function receive(Signal $signal): void + public function receive(Signal $signal): void { if (!$signal instanceof Signal\UserService\UnAssignUserFromUserGroupSignal) { return; From 5726a1f460bf5efbf43ff23d0407b9a8907eb5a6 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 29 Nov 2021 17:54:59 +0100 Subject: [PATCH 3/7] IBX-1310: Refactored solution to utilize indexContent method --- eZ/Publish/Core/Repository/UserService.php | 12 ++++++++---- .../Search/Common/Slot/AssignUserToUserGroup.php | 3 ++- .../Search/Common/Slot/UnAssignUserFromUserGroup.php | 3 ++- .../UserService/AssignUserToUserGroupSignal.php | 7 ------- .../UserService/UnAssignUserFromUserGroupSignal.php | 7 ------- eZ/Publish/Core/SignalSlot/UserService.php | 4 +++- 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/eZ/Publish/Core/Repository/UserService.php b/eZ/Publish/Core/Repository/UserService.php index a7dcf1c523b..06b355df988 100644 --- a/eZ/Publish/Core/Repository/UserService.php +++ b/eZ/Publish/Core/Repository/UserService.php @@ -971,6 +971,9 @@ public function expireUserToken($hash) /** * Assigns a new user group to the user. * + * @param \eZ\Publish\API\Repository\Values\User\User $user + * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup + * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to assign the user group to the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is already in the given user group */ @@ -1001,13 +1004,11 @@ public function assignUserToUserGroup(APIUser $user, APIUserGroup $userGroup) $this->repository->beginTransaction(); try { - $location = $locationService->createLocation( + $locationService->createLocation( $loadedUser->getVersionInfo()->getContentInfo(), $locationCreateStruct ); $this->repository->commit(); - - return $location->id; } catch (Exception $e) { $this->repository->rollback(); throw $e; @@ -1017,6 +1018,9 @@ public function assignUserToUserGroup(APIUser $user, APIUserGroup $userGroup) /** * Removes a user group from the user. * + * @param \eZ\Publish\API\Repository\Values\User\User $user + * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup + * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to remove the user group from the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is not in the given user group * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException If $userGroup is the last assigned user group @@ -1048,7 +1052,7 @@ public function unAssignUserFromUserGroup(APIUser $user, APIUserGroup $userGroup $locationService->deleteLocation($userLocation); $this->repository->commit(); - return $userLocation->id; + return; } catch (Exception $e) { $this->repository->rollback(); throw $e; diff --git a/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php index a65a5e44135..f519fdc9194 100644 --- a/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php +++ b/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php @@ -19,6 +19,7 @@ public function receive(Signal $signal): void return; } - $this->indexSubtree($signal->affectedLocationId); + $content = $this->persistenceHandler->contentHandler()->load($signal->userId); + $this->searchHandler->indexContent($content); } } diff --git a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php index 12e5a72320e..8c5a8f541f8 100644 --- a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php +++ b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php @@ -20,6 +20,7 @@ public function receive(Signal $signal): void return; } - $this->searchHandler->deleteLocation($signal->affectedLocationId, $signal->userId); + $content = $this->persistenceHandler->contentHandler()->load($signal->userId); + $this->searchHandler->indexContent($content); } } diff --git a/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php b/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php index c51017c13f6..aba6ae08da3 100644 --- a/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php +++ b/eZ/Publish/Core/SignalSlot/Signal/UserService/AssignUserToUserGroupSignal.php @@ -26,11 +26,4 @@ class AssignUserToUserGroupSignal extends Signal * @var mixed */ public $userGroupId; - - /** - * AffectedLocationId. - * - * @var mixed - */ - public $affectedLocationId; } diff --git a/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php b/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php index ca9b9e4e12a..159e9009af1 100644 --- a/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php +++ b/eZ/Publish/Core/SignalSlot/Signal/UserService/UnAssignUserFromUserGroupSignal.php @@ -26,11 +26,4 @@ class UnAssignUserFromUserGroupSignal extends Signal * @var mixed */ public $userGroupId; - - /** - * AffectedLocationId. - * - * @var mixed - */ - public $affectedLocationId; } diff --git a/eZ/Publish/Core/SignalSlot/UserService.php b/eZ/Publish/Core/SignalSlot/UserService.php index 02594ac4720..b3a8ed5883e 100644 --- a/eZ/Publish/Core/SignalSlot/UserService.php +++ b/eZ/Publish/Core/SignalSlot/UserService.php @@ -426,6 +426,9 @@ public function expireUserToken($hash) /** * Assigns a new user group to the user. * + * @param \eZ\Publish\API\Repository\Values\User\User $user + * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup + * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to assign the user group to the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is already in the given user group */ @@ -437,7 +440,6 @@ public function assignUserToUserGroup(User $user, UserGroup $userGroup) [ 'userId' => $user->id, 'userGroupId' => $userGroup->id, - 'affectedLocationId' => $returnValue, ] ) ); From ff61a97e3b54fac68dbccdb338d0e41d1bbcc4e3 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 29 Nov 2021 17:57:20 +0100 Subject: [PATCH 4/7] IBX-1310: Removed wrong code --- eZ/Publish/Core/SignalSlot/UserService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eZ/Publish/Core/SignalSlot/UserService.php b/eZ/Publish/Core/SignalSlot/UserService.php index b3a8ed5883e..6892060a71f 100644 --- a/eZ/Publish/Core/SignalSlot/UserService.php +++ b/eZ/Publish/Core/SignalSlot/UserService.php @@ -450,6 +450,9 @@ public function assignUserToUserGroup(User $user, UserGroup $userGroup) /** * Removes a user group from the user. * + * @param \eZ\Publish\API\Repository\Values\User\User $user + * @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup + * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to remove the user group from the user * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the user is not in the given user group */ @@ -461,7 +464,6 @@ public function unAssignUserFromUserGroup(User $user, UserGroup $userGroup) [ 'userId' => $user->id, 'userGroupId' => $userGroup->id, - 'affectedLocationId' => $returnValue, ] ) ); From ec922aaf4545ced4ca52c188c35f9fb8560a0dcb Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 1 Dec 2021 10:15:12 +0100 Subject: [PATCH 5/7] IBX-1310: Implement integration tests --- .../API/Repository/Tests/UserServiceTest.php | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/eZ/Publish/API/Repository/Tests/UserServiceTest.php b/eZ/Publish/API/Repository/Tests/UserServiceTest.php index 20f7f4141b1..295d20b98c2 100644 --- a/eZ/Publish/API/Repository/Tests/UserServiceTest.php +++ b/eZ/Publish/API/Repository/Tests/UserServiceTest.php @@ -2101,6 +2101,38 @@ public function testAssignUserToUserGroup() ); } + /** + * @covers \eZ\Publish\API\Repository\UserService::assignUserToUserGroup + */ + public function testAssignUserToGroupWithLocationsValidation() + { + $repository = $this->getRepository(); + $userService = $repository->getUserService(); + $locationService = $repository->getLocationService(); + + $administratorGroupId = $this->generateId('group', 12); + + $user = $this->createUserVersion1(); + + $group = $userService->loadUserGroup($administratorGroupId); + $groupLocation = $locationService->loadLocation($group->contentInfo->mainLocationId); + + // Count number of child locations before assigning user to group + $count = $locationService->getLocationChildCount($groupLocation); + + $userService->assignUserToUserGroup( + $user, + $group + ); + + $this->refreshSearch($repository); + + // Count number of child locations after assigning user to group + $count2 = $locationService->getLocationChildCount($groupLocation); + + self::assertEquals($count + 1, $count2); + } + /** * Test for the assignUserToUserGroup() method. * @@ -2224,6 +2256,47 @@ public function testUnAssignUserFromUserGroupThrowsBadStateArgumentException() /* END: Use Case */ } + /** + * @covers \eZ\Publish\API\Repository\UserService::unAssignUserFromUserGroup + */ + public function testUnAssignUserToGroupWithLocationValidation() + { + $repository = $this->getRepository(); + $userService = $repository->getUserService(); + $locationService = $repository->getLocationService(); + + $editorsGroupId = $this->generateId('group', 13); + $anonymousGroupId = $this->generateId('group', 42); + + $user = $this->createUserVersion1(); + + $this->refreshSearch($repository); + + $group = $userService->loadUserGroup($editorsGroupId); + $groupLocation = $locationService->loadLocation($group->contentInfo->mainLocationId); + + // Count number of child locations before unassigning user from group + $count = $locationService->getLocationChildCount($groupLocation); + + // Assigning user to different group to avoid removing all groups from user + $userService->assignUserToUserGroup( + $user, + $userService->loadUserGroup($anonymousGroupId) + ); + + $userService->unAssignUserFromUserGroup( + $user, + $userService->loadUserGroup($editorsGroupId) + ); + + $this->refreshSearch($repository); + + // Count number of child locations after unassigning user from group + $count2 = $locationService->getLocationChildCount($groupLocation); + + self::assertEquals($count - 1, $count2); + } + /** * Test that multi-language logic for the loadUserGroup method respects prioritized language list. * From 6ae2ef6ff33ad610eb01cc5537c24d26760f924e Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 1 Dec 2021 10:25:14 +0100 Subject: [PATCH 6/7] IBX-1310: Applied review remark --- eZ/Publish/API/Repository/Tests/UserServiceTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eZ/Publish/API/Repository/Tests/UserServiceTest.php b/eZ/Publish/API/Repository/Tests/UserServiceTest.php index 295d20b98c2..b5779eb3cc8 100644 --- a/eZ/Publish/API/Repository/Tests/UserServiceTest.php +++ b/eZ/Publish/API/Repository/Tests/UserServiceTest.php @@ -2119,6 +2119,7 @@ public function testAssignUserToGroupWithLocationsValidation() // Count number of child locations before assigning user to group $count = $locationService->getLocationChildCount($groupLocation); + $expectedCount = $count + 1; $userService->assignUserToUserGroup( $user, @@ -2128,9 +2129,9 @@ public function testAssignUserToGroupWithLocationsValidation() $this->refreshSearch($repository); // Count number of child locations after assigning user to group - $count2 = $locationService->getLocationChildCount($groupLocation); + $actualCount = $locationService->getLocationChildCount($groupLocation); - self::assertEquals($count + 1, $count2); + self::assertEquals($expectedCount, $actualCount); } /** @@ -2277,6 +2278,7 @@ public function testUnAssignUserToGroupWithLocationValidation() // Count number of child locations before unassigning user from group $count = $locationService->getLocationChildCount($groupLocation); + $expectedCount = $count - 1; // Assigning user to different group to avoid removing all groups from user $userService->assignUserToUserGroup( @@ -2292,9 +2294,9 @@ public function testUnAssignUserToGroupWithLocationValidation() $this->refreshSearch($repository); // Count number of child locations after unassigning user from group - $count2 = $locationService->getLocationChildCount($groupLocation); + $actualCount = $locationService->getLocationChildCount($groupLocation); - self::assertEquals($count - 1, $count2); + self::assertEquals($expectedCount, $actualCount); } /** From c13066269905a84b746aa964be9739a0b50fce24 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 6 Dec 2021 11:20:10 +0100 Subject: [PATCH 7/7] IBX-1310: Applied minor remarks --- eZ/Publish/API/Repository/Tests/UserServiceTest.php | 4 ++-- eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php | 2 +- .../Core/Search/Common/Slot/UnAssignUserFromUserGroup.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eZ/Publish/API/Repository/Tests/UserServiceTest.php b/eZ/Publish/API/Repository/Tests/UserServiceTest.php index 295d20b98c2..95936b0ec22 100644 --- a/eZ/Publish/API/Repository/Tests/UserServiceTest.php +++ b/eZ/Publish/API/Repository/Tests/UserServiceTest.php @@ -2104,7 +2104,7 @@ public function testAssignUserToUserGroup() /** * @covers \eZ\Publish\API\Repository\UserService::assignUserToUserGroup */ - public function testAssignUserToGroupWithLocationsValidation() + public function testAssignUserToGroupWithLocationsValidation(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2259,7 +2259,7 @@ public function testUnAssignUserFromUserGroupThrowsBadStateArgumentException() /** * @covers \eZ\Publish\API\Repository\UserService::unAssignUserFromUserGroup */ - public function testUnAssignUserToGroupWithLocationValidation() + public function testUnAssignUserToGroupWithLocationValidation(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); diff --git a/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php index f519fdc9194..7e573dca6ff 100644 --- a/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php +++ b/eZ/Publish/Core/Search/Common/Slot/AssignUserToUserGroup.php @@ -11,7 +11,7 @@ /** * A Search Engine slot handling AssignUserToUserGroupSignal. */ -class AssignUserToUserGroup extends AbstractSubtree +final class AssignUserToUserGroup extends AbstractSubtree { public function receive(Signal $signal): void { diff --git a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php index 8c5a8f541f8..9ff159730a2 100644 --- a/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php +++ b/eZ/Publish/Core/Search/Common/Slot/UnAssignUserFromUserGroup.php @@ -12,7 +12,7 @@ /** * A Search Engine slot handling UnAssignUserFromUserGroup. */ -class UnAssignUserFromUserGroup extends Slot +final class UnAssignUserFromUserGroup extends Slot { public function receive(Signal $signal): void {