ezsystems/ezpublish-kernel — pull request #433 by pspanja (2013-06-24 13:18:15+00:00)
Title: Fix EZP-21053: REST v2: 403 error when using an empty FieldDefinition element in a JSON request

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

Creating ContentType with immediate publish was not handled, this checks for `publish` GET parameter and throws exception as specified.

Note: from ContentTypeCreate parser HTTP 400 BadRequest is returned if no field definitions are provided only if content type is to be immediately published. Otherwise it is allowed to create content type draft without field definitions, as those can be subsequently added and checked for in the service upon publishing.