zopefoundation/zope.security — pull request #1 by mitchellrj (2013-10-09 16:33:35+00:00)
Title: Allow checks based on values

This pull request adds the ability to perform checks based on:
* Attribute deletion as opposed to setting
* New values to be assigned to attributes if the check passes
* Operands to in-place mutation operations (`__iadd__`, `__imul__`, etc) which would normally be called with `check` rather than `check_getattr`.

It achieves this by adding a new interface with the following extra check methods which are called by the proxy objects if provided:
* `check_setattr_with_value`: for checks based on values to be assigned to attributes. Signature is as `check_setattr` except with an extra `value` parameter.
* `check_with_value`: for checks based on operands of in-place mutation operations. Signature is as `check` except with an extra `value` parameter.
* `check_delattr`: for checks based on attribute deletion rather than mutation.