This package implements annotations for zope.security principals. Common annotation techniques, like AttributeAnnotations cannot be applied to principals, since they are created on the fly for every request.
Principal Annotations
This package implements annotations for zope.security principals. To make it clear, the principal here is the object that provides zope.security.interfaces.IPrincipal interface and annotations is the object providing zope.annotation.interfaces.IAnnotations.
The problem is that principals is dynamic, non-persistent objects created on the fly for every security participation (request or something), so common annotation techniques, like AttributeAnnotations cannot be applied to them.
This package provides a persistent storage of principal annotations, storing annotations by principal ID as well as an adapter from IPrincipal to IAnnotations.
|