[Zope3-Users] Principally annotating InternalPrincipals at
creation time
Luciano Ramalho
luciano at ramalho.org
Tue Jan 1 23:40:26 EST 2008
On Jan 1, 2008 10:05 PM, Luciano Ramalho <luciano at ramalho.org> wrote:
> I wonder if the question reproduced below was answered somewhere. I'm
> struggling with the same issue: I am using a PrincipalFolder to store
> InternalPrincipal instances, but I want to annotate them but can't
> figure out how.
I ended up declaring that InternalPrincipal implements the marker
interface IAttributeAnnotatable, and that allowed me to annotate to
the InternalPrincipal instances. It works because InternalPrincipal
instances reside in the ZODB, but I wonder if it's a good idea. If
it's not, then I'd love to see a recipe on how to use the
PrincipalAnnotation machinery with InternalPrincipal instances.
> Also, I wonder why the IInternalPrincipal does not extend IPrincipal.
> I may be wrong, but I get the feeling that the name "principal" has
> been abused to describe two different things in the API: usually a
> principal is non-persistent object which represents an user during a
> request, but in the case of the PrincipalFolder, the InternalPrincipal
> are not those same principals, but rather persistent objects which
> represent an account that allows a principal of the first kind to log
> in.
I'm still wondering about this part...
Cheers,
Luciano
More information about the Zope3-users
mailing list