Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.2, 5.3, 5.4-dev
-
None
-
eZ Publish 5.2 Platform
-
Castor Core S2, Castor Core S3, Castor Core S4
Description
Using the 5.2 API, it is possible to assign the same role with the same subtree limitations repeatedly.
Setup:
1. Create a user group
2. Via the API, call the following:
$group = $userService->loadUserGroup( <group ID> ); $profileRole = $roleService->loadRoleByIdentifier( 'some_role' ); $limitation = new SubtreeLimitation( array( 'limitationValues' => array( '/1/2/214/' ) ) ); $roleService->assignRoleToUserGroup( $profileRole, $group, $limitation ); // Second call $roleService->assignRoleToUserGroup( $profileRole, $group, $limitation );
Expected:
Looking at the user group in the admin interface, you should only see the single role
Actual:
You will see the role and limitation applied twice. Note: this does not occur when applying roles via the admin interface.