ezsystems/ezpublish-kernel — pull request #548 by pspanja (2013-10-07 19:31:40+00:00)
Title: Implement EZP-21674: Status Limitation

This PR resolves issue https://jira.ez.no/browse/EZP-21674

Status Limitation is implemented.
Because this Limitation does not affect Search new convention is introduced: for such Limitations method `LimitationType::getCriterion()` must return `null`.

Legacy Stack allows creation of limitations with PENDING and REJECTED statuses. Such limitations when used for permission checking in Public API will not produce errors, but it is not possible to create them. Only DRAFT, PUBLISHED and ARCHIVED statuses are allowed (see `validate()` method of the LimitationType).

Values of the status constants in API [VersionInfo](https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/API/Repository/Values/Content/VersionInfo.php) are synced with values stored in the database. A small difference existed between these, and sync was done in order to avoid unnecessary translating between layers (eg. see usage of `LimitationType::buildValue()` in `Repository::canUser()`).