For some sites, it may be useful to allow certain users, such as site administrators, to edit content without satisfying field validators. For example, a site with a content type for capturing member contact information would use required fields for most of the contact information fields. On rare occasions, however, the contact information object may be required for some purposes, such as general listing, but the full contact information may not be available, such as wen a member is away.
collective.validationoverride is a Plone product that provides patches the Archetypes field validator method such that when field validation failures are logged but validation status is still successful. Specifically, a permission is checked and if the current user has that permission in the context of the object, the validation error is logged and then removed from the list of validation errors allowing for a successful validation status.
The permission to check is taken from the 'validation_override_permission' field attribute defaulting to the "Override validation" permission. As such, field validation may be overridden without modifying the content types by assigning the "Override validation" permission to the appropriate roles in the desired contexts. By default, the "Manager" role has this permission.
Requirements:
· Python
· Plone CMS