Details
-
Improvement
-
Resolution: Done
-
Medium
-
5.0, 5.1, 5.2-alpha1, 5.2-beta1
Description
RoleService methods persisting Limitations also validate them using:
\eZ\Publish\SPI\Limitation\Type::validate()
Right now for invalid Limitations InvalidArgumentException is thrown, but a new exception (LimitationValidationException) should be defined through which these errors could be accessed, similar to https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Base/Exceptions/ContentFieldValidationException.php.
Also some methods that persist and validate Policy do not hint the exception thrown. This should be documented in PHPDoc and maybe also similar exception (PolicyValidationException?) should be considered.
Attachments
Issue Links
- discovered while testing
-
EZP-21703 RoleService does not validate Limitations in assignRoleToUser() and assignRoleToUserGroup() methods
- Closed